Wrong commit ID when pushing annotated tag

Robert L. February 19, 2014

The plugin works fine when pushing changes to branch or lightweight tag. However, when annotated is pushed the commit id passed to the external script does not match the tag's commit ID. As commit id is the only way to uniquely identify the pushed update in environment with multiple repos/branches, the execution of external script fails as based on passed commit ID it can not identify repo/tag.

3 answers

1 accepted

0 votes
Answer accepted
VPCx User March 11, 2014

Charles, yes this answers the question. Thank you for help.

0 votes
Robert L. March 11, 2014

Charles, yes this answers the question. Thank you for help.

0 votes
cofarrell
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 21, 2014

Hi Robert,

Just to confirm you're talking about the "External Hooks" plugin? If you're writing your own script for that plugin you can use manual git commands to find that out.

Firstly you need to know if it's a tag or commit:

> git cat-file -t $to_ref

If that is 'tag' rather than 'commit' you need to find the referenced commit:

> git rev-parse $to_ref^{commit}

Does that help? Are we talking about the same thing?

Charles

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events