Skip to content

Commit

Permalink
Merge branch 'sp/maint-describe-all-tag-warning' into maint
Browse files Browse the repository at this point in the history
* sp/maint-describe-all-tag-warning:
  describe: Avoid unnecessary warning when using --all
  • Loading branch information
Junio C Hamano committed Dec 27, 2008
2 parents f83b9ba + 81dc223 commit fcd3549
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion builtin-describe.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ static void display_name(struct commit_name *n)
n->tag = lookup_tag(n->sha1);
if (!n->tag || parse_tag(n->tag) || !n->tag->tag)
die("annotated tag %s not available", n->path);
if (strcmp(n->tag->tag, n->path))
if (strcmp(n->tag->tag, all ? n->path + 5 : n->path))
warning("tag '%s' is really '%s' here", n->tag->tag, n->path);
}

Expand Down
6 changes: 6 additions & 0 deletions t/t6120-describe.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,12 @@ check_describe B --tags HEAD^^2^
check_describe B-0-* --long HEAD^^2^
check_describe A-3-* --long HEAD^^2

: >err.expect
check_describe A --all A^0
test_expect_success 'no warning was displayed for A' '
test_cmp err.expect err.actual
'

test_expect_success 'rename tag A to Q locally' '
mv .git/refs/tags/A .git/refs/tags/Q
'
Expand Down

0 comments on commit fcd3549

Please sign in to comment.