Re: Getting the commit that corresponds to a specific annotated tag
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 1, 2012, 22:00 UTC
- Message-ID
- <7vd35i1ymz.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <CA+mfgz2=ZFBetSGv1Bkq6orBbpVTS1k0gLVm0nGoR1sUDkDwqQ@mail.gmail.com>
Adam Mercer <ramercer@gmail.com> writes:
Show 6 quoted lines
> For some porcelain I'm writing I need to determine the commit that
> corresponds to a given annotated tag, so far I have the following:
>
> $ git cat-file tag <tag_name> | grep object | awk '{print $2}'
>
> Is there already some pluming that performs this task?I think you want
git rev-parse $tag^{commit}It's kind of scary, though.