aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--builtin-describe.c2
-rwxr-xr-xt/t6120-describe.sh2
2 files changed, 3 insertions, 1 deletions
diff --git a/builtin-describe.c b/builtin-describe.c
index df67a733a..7542b5705 100644
--- a/builtin-describe.c
+++ b/builtin-describe.c
@@ -197,7 +197,7 @@ static void describe(const char *arg, int last_one)
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 8c7e081c5..f5a1b615f 100755
--- a/t/t6120-describe.sh
+++ b/t/t6120-describe.sh
@@ -34,6 +34,8 @@ test_expect_success setup '
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) &&