mirror of
https://github.com/git/git
synced 2024-08-27 19:49:21 +00:00
Merge branch 'dk/describe-all-output-fix' into maint
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
This commit is contained in:
commit
468dc22e00
|
@ -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)
|
||||
|
|
|
@ -122,7 +122,7 @@ test_expect_success 'describe --contains defaults to HEAD without commit-ish' '
|
|||
'
|
||||
|
||||
: >err.expect
|
||||
check_describe A --all A^0
|
||||
check_describe tags/A --all A^0
|
||||
test_expect_success 'no warning was displayed for A' '
|
||||
test_cmp err.expect err.actual
|
||||
'
|
||||
|
@ -374,4 +374,8 @@ test_expect_success ULIMIT_STACK_SIZE 'describe works in a deep repo' '
|
|||
test_cmp expect actual
|
||||
'
|
||||
|
||||
check_describe tags/A --all A
|
||||
check_describe tags/c --all c
|
||||
check_describe heads/branch_A --all --match='branch_*' branch_A
|
||||
|
||||
test_done
|
||||
|
|
Loading…
Reference in a new issue