New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to generate and insert a Gerrit Change-Id into the commit message #219

svogt opened this Issue Aug 8, 2014 · 0 comments


None yet
2 participants

svogt commented Aug 8, 2014

In order to push to a Gerrit instance a Change-Id might be required.

JGit has a utility for that:

For general documentation see:

For C-Git the following hook is typically used:

_gen_ChangeIdInput() {
    echo "tree `git write-tree`"
    if parent=`git rev-parse "HEAD^0" 2>/dev/null`
        echo "parent $parent"
    echo "author `git var GIT_AUTHOR_IDENT`"
    echo "committer `git var GIT_COMMITTER_IDENT`"
    printf '%s' "$clean_message"
_gen_ChangeId() {
    _gen_ChangeIdInput |
    git hash-object -t commit --stdin

@svogt svogt added the feature label Aug 8, 2014

@jutzig jutzig added this to the 1.1.3 milestone Aug 11, 2014

@jutzig jutzig closed this in 6a31b68 Aug 11, 2014

@jutzig jutzig assigned svogt and jutzig and unassigned svogt Dec 12, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment