commit dc99d75e8ee32b650f5ac642b964cfaa303d18d8
Author: Kacper Kornet <[email protected]>
Date: Thu Apr 11 18:00:47 2013 +0100
Add tool to reverse order parents in commit produced by pull
Merges produced by git pull from upstream repository results
in history with "wrong" first-parent ancestry. Tool fixmerge.sh
fixes such a commit. It also modifies the commit message to reflect
what was really merged where.
fixmerge.sh | 7 +++++++
1 file changed, 7 insertions(+)
---
diff --git a/fixmerge.sh b/fixmerge.sh
new file mode 100755
index 0000000..90ef7a2
--- /dev/null
+++ b/fixmerge.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+# Changes the order of parents and commitlog in the merge produced by git
pull. It produces
+# the nicer history with git log --first-parent
+
+git filter-branch -f --parent-filter "tee ~/P.OUT | awk '{if(NF==4) print
\$1,\$4,\$3,\$2;}'| tee -a ~/P.OUT" \
+ --msg-filter "sed 's/\(Merge branch .*\) of/\1 into/'" HEAD^!
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/rpm-build-tools.git/commitdiff/dc99d75e8ee32b650f5ac642b964cfaa303d18d8
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit