Do not fail "describe --always" in a tag-less repository
This fixes a regression introduce by d68dc34
(git-describe: Die early if
there are no possible descriptions, 2009-08-06).
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
parent
975457f185
commit
024ab976ff
|
@ -197,7 +197,7 @@ static void describe(const char *arg, int last_one)
|
||||||
for_each_ref(get_name, NULL);
|
for_each_ref(get_name, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!found_names)
|
if (!found_names && !always)
|
||||||
die("cannot describe '%s'", sha1_to_hex(sha1));
|
die("cannot describe '%s'", sha1_to_hex(sha1));
|
||||||
|
|
||||||
n = cmit->util;
|
n = cmit->util;
|
||||||
|
|
|
@ -34,6 +34,8 @@ test_expect_success setup '
|
||||||
echo one >file && git add file && git commit -m initial &&
|
echo one >file && git add file && git commit -m initial &&
|
||||||
one=$(git rev-parse HEAD) &&
|
one=$(git rev-parse HEAD) &&
|
||||||
|
|
||||||
|
git describe --always HEAD &&
|
||||||
|
|
||||||
test_tick &&
|
test_tick &&
|
||||||
echo two >file && git add file && git commit -m second &&
|
echo two >file && git add file && git commit -m second &&
|
||||||
two=$(git rev-parse HEAD) &&
|
two=$(git rev-parse HEAD) &&
|
||||||
|
|
Loading…
Reference in New Issue