Re: determine name of tag used for checkout when multiple tags exist?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 3, 2015 at 7:53 PM, Jesse Hopkins <jesse.hops@xxxxxxxxx> wrote:

>
> It seems to me that when checking out to a tag, Git does not record the
> *name* of the tag anywhere, but rather sets HEAD to the de-referenced
> commit SHA-1.  As far as I can tell, it is not possible to recover the
> original name of the tag in the case of multiple tags on the same commit.
> Is my conclusion correct?
>

I believe you are correct unless you check out to a branch named after
the tag? I don't believe it will actually store the tag as part of its
checkout.

Ie:

git checkout <tag>

may show "checked out at <tag>" via status, but that is only because
status uses describe to find that out..

I don't believe we store the information. You could recover it if you
know something about the format so as to distinquish them, ie: if you
only cared about annotated tags vs lightweight tags, for example.

Regards,
Jake
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]