Add an option to selectively disable changeId

The commit hook, if added, always adds a changeId to the bottom
of the commit message.

There is a configuration variable gerrit.createChangeId, which
can be used to configure EGit to generate the changeId if specified.

Respect the setting gerrit.createChangeId=false if the commit hook
is set, in case standard tools always put the commit hook in place
but it is not required for certain builds. This can be set at a
global, or local change.

Change-Id: I43a098453005fe0dcc60b6c4f6e4817f97ce24cf
This commit is contained in:
Alex Blewitt 2013-06-17 14:59:40 +01:00
parent ea2a0d8c95
commit b6131581f1

View File

@ -38,6 +38,11 @@ add_ChangeId() {
return
fi
if test "false" = "`git config --bool --get gerrit.createChangeId`"
then
return
fi
# Does Change-Id: already exist? if so, exit (no change).
if grep -i '^Change-Id:' "$MSG" >/dev/null
then