2 Jun 2012 00:00
Re: Getting the commit that corresponds to a specific annotated tag
Junio C Hamano <gitster <at> pobox.com>
2012-06-01 22:00:04 GMT
2012-06-01 22:00:04 GMT
Adam Mercer <ramercer <at> gmail.com> writes:
> 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.
RSS Feed