[coreboot-gerrit] New patch to review for coreboot: 08c5c70 git: add rebase helper script

Stefan Reinauer (stefan.reinauer@coreboot.org) gerrit at coreboot.org
Sat Apr 4 02:08:24 CEST 2015


Stefan Reinauer (stefan.reinauer at coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/9299

-gerrit

commit 08c5c70bb902062c2f1f17d8d2dc773d6c7aed72
Author: Patrick Georgi <pgeorgi at google.com>
Date:   Fri Apr 3 17:06:48 2015 -0700

    git: add rebase helper script
    
    This is a script we have been using to rewrite commit messages when
    upstreaming coreboot patches from the ChromiumOS tree into coreboot
    upstream.
    
    Change-Id: I5442279c099dafe55cc97ccf09ee2bc2df4eca5f
    Signed-off-by: Stefan Reinauer <stefan.reinauer at coreboot.org>
    Signed-off-by: Patrick Georgi <patrick at georgi-clan.de>
---
 util/gitconfig/rebase.sh | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/util/gitconfig/rebase.sh b/util/gitconfig/rebase.sh
new file mode 100755
index 0000000..53b3ef1
--- /dev/null
+++ b/util/gitconfig/rebase.sh
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+# rebase.sh - rebase helper script
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+
+# When pulling in patches from another tree, do the following:
+#  git remote add ...
+#  git checkout -b upstreaming
+#  git cherry-pick ...
+#  git rebase -i --exec util/gitconfig/rebase.sh master
+
+msg() {
+	git log -n 1 | grep "^    " | cut -c5-
+}
+
+CHID=$(msg | grep -i "^Change-Id: I")
+CID=$(git log -n1 --grep "^$CHID$" --pretty=%H cros/chromeos-2013.04)
+GUID="`git config user.name` <`git config user.email`>"
+msg | tac | awk '/^$/ {if (end==0) print "Original-Commit-Id: '"$CID"'\nSigned-off-by: '"$GUID"'"; end=1}; { if (end==0) print "Original-" $0; else print $0;}' | tac | git commit --amend -F -



More information about the coreboot-gerrit mailing list