git_interface: Force-move Change-Id to end of commit message

Sometimes the git commit hook inserts the Change-Id into the middle of
the commit message and not to its last paragraph. This seems to happen
if '---' is part of the commit message. Subsequently gerrit refuses to
accept the commit.

Solve the problem by force-moving the Change-Id to the end of the commit

While at it, drop get_last_commit_sha_linux_chrome() and its use - we
can refer to the most recent commit in a branch by using the 'HEAD'
reference, without knowing the actual SHA.

TEST=Run patch robot

Change-Id: I68cfe434753d20cdf1f00929b8f1e2ff490b76b5
Reviewed-by: Curtis Malainey <>
Commit-Queue: Guenter Roeck <>
Tested-by: Guenter Roeck <>
1 file changed