File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -115,9 +115,18 @@ mark_action_done () {
115
115
}
116
116
117
117
make_patch () {
118
- parent_sha1=$( git rev-parse --verify " $1 " ^) ||
119
- die " Cannot get patch for $1 ^"
120
- git diff-tree -p " $parent_sha1 " .." $1 " > " $DOTEST " /patch
118
+ sha1_and_parents=" $( git rev-list --parents -1 " $1 " ) "
119
+ case " $sha1_and_parents " in
120
+ ?* ' ' ?* ' ' ?* )
121
+ git diff --cc $sha1_and_parents
122
+ ;;
123
+ ?* ' ' ?* )
124
+ git diff-tree -p " $1 ^!"
125
+ ;;
126
+ * )
127
+ echo " Root commit"
128
+ ;;
129
+ esac > " $DOTEST " /patch
121
130
test -f " $DOTEST " /message ||
122
131
git cat-file commit " $1 " | sed " 1,/^$/d" > " $DOTEST " /message
123
132
test -f " $DOTEST " /author-script ||
Original file line number Diff line number Diff line change @@ -83,6 +83,7 @@ test_expect_success '--continue works after a conflict' '
83
83
test 2 = $(git ls-files B | wc -l) &&
84
84
echo Resolved again > B &&
85
85
test_must_fail git rebase --continue &&
86
+ grep "^@@@ " .git/rebase-merge/patch &&
86
87
git add B &&
87
88
git rebase --continue &&
88
89
test 1 = $(git rev-list --all --pretty=oneline | grep "Modify A" | wc -l) &&
You can’t perform that action at this time.
0 commit comments