Hi,
the commit-msg hook is installed in the local repo. And previous pushes to /refs/for/branch-name have worked fine.
But now this commit message
Author: John <email>
Date: Fri May 12 13:53:45 2017 +0100
new script gerritPush.sh
issue #3
Change-Id: I7bf3a767422c542a265c25e41eceb9ce88d83618
causes this error when pushed.
$ git push origin HEAD:refs/for/3-add-gerritpush-script
Counting objects: 11, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 775 bytes | 0 bytes/s, done.
Total 5 (delta 1), reused 0 (delta 0)
remote: Resolving deltas: 100% (1/1)
remote: Processing changes: refs: 1, done
remote: ERROR: [4e5f009] missing Change-Id in commit message footer
remote:
remote: Hint: To automatically insert Change-Id, install the hook:
remote: gitdir=$(git rev-parse --git-dir); scp -p -P 29418 user@machine:hooks/commit-msg ${gitdir}/hooks/
remote: And then amend the commit:
remote: git commit --amend
remote:
To ssh://user@machine:29418/test3
! [remote rejected] HEAD -> refs/for/3-add-gerritpush-script ([4e5f009] missing Change-Id in commit message footer)
error: failed to push some refs to 'ssh://user@machine:29418/test3'
And from what I can see the change-id is in the last paragraph. And the commit message is same format as previous successfully pushed commits.
So what have I done wrong?
Regards,
John