summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 975457f)
raw | patch | inline | side by side (parent: 975457f)
author | Junio C Hamano <gitster@pobox.com> | |
Fri, 23 Oct 2009 18:42:39 +0000 (11:42 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 23 Oct 2009 19:00:41 +0000 (12:00 -0700) |
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>
there are no possible descriptions, 2009-08-06).
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-describe.c | patch | blob | history | |
t/t6120-describe.sh | patch | blob | history |
diff --git a/builtin-describe.c b/builtin-describe.c
index df67a733ae5c91b0b4278c31c12a7432c0ec601e..7542b5705c4e0f3d214d3f3ff7367ee03bf82b9f 100644 (file)
--- a/builtin-describe.c
+++ b/builtin-describe.c
for_each_ref(get_name, NULL);
}
- if (!found_names)
+ if (!found_names && !always)
die("cannot describe '%s'", sha1_to_hex(sha1));
n = cmit->util;
diff --git a/t/t6120-describe.sh b/t/t6120-describe.sh
index 8c7e081c53eec31d38844d8efb9b942893107b09..f5a1b615f65ecac2becff67d47842e7aed3d6091 100755 (executable)
--- a/t/t6120-describe.sh
+++ b/t/t6120-describe.sh
echo one >file && git add file && git commit -m initial &&
one=$(git rev-parse HEAD) &&
+ git describe --always HEAD &&
+
test_tick &&
echo two >file && git add file && git commit -m second &&
two=$(git rev-parse HEAD) &&