summaryrefslogtreecommitdiff
path: root/builtin/describe.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-01-23 21:16:28 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-01-23 21:16:28 (GMT)
commitfac64e011f1b1ecabcccf7ad2511efcac3e26bdc (patch)
treec42dd7ee0406e30714e52ac6381327c5b62d2432 /builtin/describe.c
parent59c276cf4da0705064c32c9dba54baefa282ea55 (diff)
parent1bba00130a1a0332ec0ad2f878a09ca9b2b18ee2 (diff)
downloadgit-fac64e011f1b1ecabcccf7ad2511efcac3e26bdc.zip
git-fac64e011f1b1ecabcccf7ad2511efcac3e26bdc.tar.gz
git-fac64e011f1b1ecabcccf7ad2511efcac3e26bdc.tar.bz2
Merge branch 'dk/describe-all-output-fix'
An old regression in "git describe --all $annotated_tag^0" has been fixed. * dk/describe-all-output-fix: describe: prepend "tags/" when describing tags with embedded name
Diffstat (limited to 'builtin/describe.c')
-rw-r--r--builtin/describe.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/builtin/describe.c b/builtin/describe.c
index 3b0b204..6fe1c51 100644
--- a/builtin/describe.c
+++ b/builtin/describe.c
@@ -274,10 +274,13 @@ static void append_name(struct commit_name *n, struct strbuf *dst)
n->name_checked = 1;
}
- if (n->tag)
+ if (n->tag) {
+ if (all)
+ strbuf_addstr(dst, "tags/");
strbuf_addstr(dst, n->tag->tag);
- else
+ } else {
strbuf_addstr(dst, n->path);
+ }
}
static void append_suffix(int depth, const struct object_id *oid, struct strbuf *dst)