Merge branch 'jc/describe-misnamed-annotated-tag'
authorJunio C Hamano <gitster@pobox.com>
Fri, 27 Mar 2020 00:11:21 +0000 (17:11 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 27 Mar 2020 00:11:21 +0000 (17:11 -0700)
commit0f0625a630081d532d528d87ba236a6385bbbac1
treee6c3e6c57219732b8165105970590a7d09cec91d
parentfb4175b0e4bec59b97dae84a0073d8a5334508d6
parentff165f00c1065d94c0bcab8708364e6dc5655f5d
Merge branch 'jc/describe-misnamed-annotated-tag'

When "git describe C" finds an annotated tag with tagname A to be
the best name to explain commit C, and the tag is stored in a
"wrong" place in the refs/tags hierarchy, e.g. refs/tags/B, the
command gave a warning message but used A (not B) to describe C.
If C is exactly at the tag, the describe output would be "A", but
"git rev-parse A^0" would not be equal as "git rev-parse C^0".  The
behavior of the command has been changed to use the "long" form
i.e. A-0-gOBJECTNAME, which is correctly interpreted by rev-parse.

* jc/describe-misnamed-annotated-tag:
  describe: force long format for a name based on a mislocated tag
builtin/describe.c
t/t6120-describe.sh