0

I am trying to link Jira issues to commits in a central git repository, and have found the plugin SCM Activity for Jira. It is designed to be called from a post-receive hook.

The post-receive (and pre-receive) hook receives input on stdin like this:

<old-value> SP <new-value> SP <ref-name> LF

where is the old object name stored in the ref, <new-value> is the new object name to be stored in the ref and <ref-name> is the full name of the ref. When creating a new ref, <old-value> is 40 0.

(from man githooks)

Now I would like to "re-play" the sequence of pushes to the repository, to populate the database in Jira based on historical data.

git log --pretty=format "%H %gd" gives me part of what I want, but is there a way to get the previous value for a ref in a given commit?

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.