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 () {
115115}
116116
117117make_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
121130 test -f " $DOTEST " /message ||
122131 git cat-file commit " $1 " | sed " 1,/^$/d" > " $DOTEST " /message
123132 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' '
8383 test 2 = $(git ls-files B | wc -l) &&
8484 echo Resolved again > B &&
8585 test_must_fail git rebase --continue &&
86+ grep "^@@@ " .git/rebase-merge/patch &&
8687 git add B &&
8788 git rebase --continue &&
8889 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