提交 f3d5e463 编写于 作者: J Johannes Schindelin 提交者: Shawn O. Pearce

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: NJohannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: NLars Hjemli <hjemli@gmail.com>
Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
上级 922aa807
......@@ -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."
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册