summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2007-10-09 12:59:43 (GMT)
committerShawn O. Pearce <spearce@spearce.org>2007-10-16 01:16:08 (GMT)
commitf3d5e463f06c34716a9ce9d946e689377e9fda37 (patch)
treeb603c118d9e174f570ddaf0b30bf0e8e5f8247d4
parent922aa807f5fee97fcb2ccd1d1db63b59bdd02128 (diff)
downloadgit-f3d5e463f06c34716a9ce9d946e689377e9fda37.zip
git-f3d5e463f06c34716a9ce9d946e689377e9fda37.tar.gz
git-f3d5e463f06c34716a9ce9d946e689377e9fda37.tar.bz2
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>
-rwxr-xr-xgit-rebase--interactive.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index 653393d..50b79ff 100755
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -78,7 +78,7 @@ mark_action_done () {
make_patch () {
parent_sha1=$(git rev-parse --verify "$1"^ 2> /dev/null)
- git diff "$parent_sha1".."$1" > "$DOTEST"/patch
+ git diff-tree -p "$parent_sha1".."$1" > "$DOTEST"/patch
}
die_with_patch () {
@@ -302,7 +302,7 @@ do_next () {
git update-ref -m "$message" $HEADNAME $NEWHEAD $OLDHEAD &&
git symbolic-ref HEAD $HEADNAME && {
test ! -f "$DOTEST"/verbose ||
- git diff --stat $(cat "$DOTEST"/head)..HEAD
+ git diff-tree --stat $(cat "$DOTEST"/head)..HEAD
} &&
rm -rf "$DOTEST" &&
warn "Successfully rebased and updated $HEADNAME."