Merge branch 'nd/rebase-show-current-patch'
The new "--show-current-patch" option gives an end-user facing way to get the diff being applied when "git rebase" (and "git am") stops with a conflict. * nd/rebase-show-current-patch: rebase: introduce and use pseudo-ref REBASE_HEAD rebase: add --show-current-patch am: add --show-current-patch
This commit is contained in:
@ -225,6 +225,14 @@ test_expect_success 'stop on conflicting pick' '
|
||||
test 0 = $(grep -c "^[^#]" < .git/rebase-merge/git-rebase-todo)
|
||||
'
|
||||
|
||||
test_expect_success 'show conflicted patch' '
|
||||
GIT_TRACE=1 git rebase --show-current-patch >/dev/null 2>stderr &&
|
||||
grep "show.*REBASE_HEAD" stderr &&
|
||||
# the original stopped-sha1 is abbreviated
|
||||
stopped_sha1="$(git rev-parse $(cat ".git/rebase-merge/stopped-sha"))" &&
|
||||
test "$(git rev-parse REBASE_HEAD)" = "$stopped_sha1"
|
||||
'
|
||||
|
||||
test_expect_success 'abort' '
|
||||
git rebase --abort &&
|
||||
test $(git rev-parse new-branch1) = $(git rev-parse HEAD) &&
|
||||
|
Reference in New Issue
Block a user