I have created a object tag
git tag -a tag_1 -m "test tag"
But the following command reports a fatal error:
git cat-file -t tag_1^{tag}
fatal: Not a valid object name tag_1^{tag}
However, the following one works fine:
git cat-file -t master^{commit}
commit
Why does it report fatal?
The syntax used to specify an object in
git cat-fileis the one specified in gitrevisions.And it applies to a
<rev>.In this case, I am not sure it can dereference
tag_1“until an object of that type is found” (since it is already a tag).