In older versions of Gerrit the Change-Id field was inserted at the
start of the trailers. Commit 68296f7180
simplified the trailers code by using git trailers instead of custom
code but now inserts Change-Id at the end of the trailers section.
A consequence of this is that folks who sign-off their commits using
`git commit -s` now has the sign-off appear first followed by
Change-Id. If the user then runs `git commit -s --amend` to update
the change because the Sign-off-by line is not last, git inserts
a 2nd duplicate Signed-off-by line.
This patch simply restores the previous behaviour of the Gerrit
commit-msg hook where Change-Id would be inserted before the
Sign-off-by line to avoid this issue.
Bug: Issue 12546
Change-Id: Ice8ffd5c74c9a1023ca38d060a1ed844330b422a
Signed-off-by: Thanh Ha <zxiiro@gmail.com>