Merge branch 'dk/describe-all-output-fix'
[git/git.git] / builtin / describe.c
index 3b0b204..6fe1c51 100644 (file)
@@ -274,10 +274,13 @@ static void append_name(struct commit_name *n, struct strbuf *dst)
                n->name_checked = 1;
        }
 
                n->name_checked = 1;
        }
 
-       if (n->tag)
+       if (n->tag) {
+               if (all)
+                       strbuf_addstr(dst, "tags/");
                strbuf_addstr(dst, n->tag->tag);
                strbuf_addstr(dst, n->tag->tag);
-       else
+       } else {
                strbuf_addstr(dst, n->path);
                strbuf_addstr(dst, n->path);
+       }
 }
 
 static void append_suffix(int depth, const struct object_id *oid, struct strbuf *dst)
 }
 
 static void append_suffix(int depth, const struct object_id *oid, struct strbuf *dst)