summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2012-05-14 02:37:52 -0500
committerPetr Mladek <pmladek@suse.cz>2012-05-15 13:21:43 +0200
commit31dca4d87f51045d2b0568b4020a4d549375b215 (patch)
tree520a04907a40ac00ad8457ebb622a3d9b27eabfe
parentcommit-hook: tweak add_ChangeId() to tolerate git-am -s behavior (diff)
downloadcore-31dca4d87f51045d2b0568b4020a4d549375b215.tar.gz
core-31dca4d87f51045d2b0568b4020a4d549375b215.zip
fix issue with repeated I in case of amend commit
Change-Id: I2f0f02fb545ae6d63f2d4e46327f6ee402ab608c Signed-off-by: Petr Mladek <pmladek@suse.cz>
-rwxr-xr-xgit-hooks/commit-msg2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-hooks/commit-msg b/git-hooks/commit-msg
index d784d6561130..ad6400d1fcde 100755
--- a/git-hooks/commit-msg
+++ b/git-hooks/commit-msg
@@ -100,7 +100,7 @@ add_ChangeId() {
return
fi
- id=`grep -i '^Change-Id:' "$MSG" | sed -e "s/.*://"`
+ id=`grep -i '^Change-Id:' "$MSG" | sed -e "s/.*: I//"`
temp_msg=`grep -v -i '^Change-Id:' "$MSG"`
echo "$temp_msg" > "$MSG"