]> git.ipfire.org Git - thirdparty/git.git/commit
t5604: do not expect that HEAD can be a valid tagname
authorJunio C Hamano <gitster@pobox.com>
Tue, 3 Dec 2024 02:32:39 +0000 (11:32 +0900)
committerJunio C Hamano <gitster@pobox.com>
Tue, 3 Dec 2024 03:38:50 +0000 (12:38 +0900)
commite5ce5b05d09c17c3d6a1d95c4c822dd3a73a9100
tree02c28b15878e52f1bc6e5f2279aaa26009b2d354
parent93e5e048f84138a632b239632c9b45ae238cdf1c
t5604: do not expect that HEAD can be a valid tagname

09116a1c (refs: loosen over-strict "format" check, 2011-11-16)
introduced a test piece (originally in t5700) that expects to be
able to create a tag named "HEAD" and then a local clone using the
repository as its own reference works correctly.  Later, another
test piece started using this tag starting at acede2eb (t5700:
document a failure of alternates to affect fetch, 2012-02-11).

But the breakage 09116a1c fixed was not specific to the tagname
HEAD.  It would have failed exactly the same way if the tag used
were foo instead of HEAD.

Before forbidding "git tag" from creating "refs/tags/HEAD", update
these tests to use 'foo', not 'HEAD', as the name of the test tag.

Note that the test piece that uses the tag learned the value of the
tag in unnecessarily inefficient and convoluted way with for-each-ref.
Just use "rev-parse" instead.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5604-clone-reference.sh