@matheusbsbs / matheus-bagliano / commits / f3d5e463f0
Fork 0

rebase -i: use diff plumbing instead of porcelain

When diff drivers are installed, calling "git diff <tree1>..<tree2>" calls those drivers. This borks the patch generation of rebase -i. So use "git diff-tree -p" instead, which does not call diff drivers. Noticed by Johannes Sixt. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

Johannes Schindelin committed Oct 9, 2007 at 13:59 UTC f3d5e463f06c34716a9ce9d946e689377e9fda37
1 file changed +2 -2
git-rebase--interactive.sh
+2 -2
@@ -78,7 +78,7 @@ mark_action_done () {
78
79 make_patch () {
80 parent_sha1=$(git rev-parse --verify "$1"^ 2> /dev/null)
81 - git diff "$parent_sha1".."$1" > "$DOTEST"/patch
81 + git diff-tree -p "$parent_sha1".."$1" > "$DOTEST"/patch
82 }
83
84 die_with_patch () {
@@ -302,7 +302,7 @@ do_next () {
302 git update-ref -m "$message" $HEADNAME $NEWHEAD $OLDHEAD &&
303 git symbolic-ref HEAD $HEADNAME && {
304 test ! -f "$DOTEST"/verbose ||
305 - git diff --stat $(cat "$DOTEST"/head)..HEAD
305 + git diff-tree --stat $(cat "$DOTEST"/head)..HEAD
306 } &&
307 rm -rf "$DOTEST" &&
308 warn "Successfully rebased and updated $HEADNAME."