summaryrefslogtreecommitdiff
path: root/builtin/describe.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/describe.c')
-rw-r--r--builtin/describe.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/builtin/describe.c b/builtin/describe.c
index 3b0b204..c428984 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)
@@ -380,7 +383,7 @@ static void describe_commit(struct object_id *oid, struct strbuf *dst)
if (!match_cnt) {
struct object_id *cmit_oid = &cmit->object.oid;
if (always) {
- strbuf_addstr(dst, find_unique_abbrev(cmit_oid->hash, abbrev));
+ strbuf_add_unique_abbrev(dst, cmit_oid->hash, abbrev);
if (suffix)
strbuf_addstr(dst, suffix);
return;