diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-03-06 14:54:02 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-03-06 14:54:02 -0800 |
commit | 9ca488c04bdab90668471640baeb0d9140be064c (patch) | |
tree | 6a1e4c6acaff06f234b12fdbb0b4ad9ab3bc8048 /t/t3404-rebase-interactive.sh | |
parent | 2cd91ec1970bd89e6b4b79b5aa41f27435625e71 (diff) | |
parent | fbd7a23237094c3fb2e249bbcacbbf1e858e79c9 (diff) | |
download | git-9ca488c04bdab90668471640baeb0d9140be064c.tar.gz |
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
Diffstat (limited to 't/t3404-rebase-interactive.sh')
-rwxr-xr-x | t/t3404-rebase-interactive.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh index ef2887bd85..3b905406df 100755 --- a/t/t3404-rebase-interactive.sh +++ b/t/t3404-rebase-interactive.sh @@ -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) && |