Commit 6d1fe685 authored by Brad King's avatar Brad King
Browse files

commit-msg: Allow Change-Id only in footer

Gerrit recognizes the Change-Id line only if it appears in the footer.
parent c3d0b77f
......@@ -79,7 +79,15 @@ msg_second() {
}
msg_rest() {
false
if echo "$line" | grep -q "^Change-Id:"; then
state=gerrit
fi
}
msg_gerrit() {
test "x$line" = "x" && return
echo "$line" | grep -q '^[A-Za-z0-9-][A-Za-z0-9-]*:' && return
die 'The Change-Id line must appear in a footer at the bottom.'
}
# Pipe commit message into the state machine.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment