summaryrefslogtreecommitdiff
path: root/git-rebase.sh
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2018-03-06 14:54:02 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-03-06 14:54:02 -0800
commit9ca488c04bdab90668471640baeb0d9140be064c (patch)
tree6a1e4c6acaff06f234b12fdbb0b4ad9ab3bc8048 /git-rebase.sh
parentMerge branch 'xz/send-email-batch-size' (diff)
parentrebase: introduce and use pseudo-ref REBASE_HEAD (diff)
downloadtgif-9ca488c04bdab90668471640baeb0d9140be064c.tar.xz
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 'git-rebase.sh')
-rwxr-xr-xgit-rebase.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/git-rebase.sh b/git-rebase.sh
index b353c33d41..a1f6e5de6a 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -46,6 +46,7 @@ abort! abort and check out the original branch
skip! skip current patch and continue
edit-todo! edit the todo list during an interactive rebase
quit! abort but keep HEAD where it is
+show-current-patch! show the patch file being applied or merged
"
. git-sh-setup
set_reflog_action rebase
@@ -183,6 +184,7 @@ You can run "git stash pop" or "git stash drop" at any time.
}
finish_rebase () {
+ rm -f "$(git rev-parse --git-path REBASE_HEAD)"
apply_autostash &&
{ git gc --auto || true; } &&
rm -rf "$state_dir"
@@ -247,7 +249,7 @@ do
--verify)
ok_to_skip_pre_rebase=
;;
- --continue|--skip|--abort|--quit|--edit-todo)
+ --continue|--skip|--abort|--quit|--edit-todo|--show-current-patch)
test $total_argc -eq 2 || usage
action=${1##--}
;;
@@ -417,6 +419,10 @@ quit)
edit-todo)
run_specific_rebase
;;
+show-current-patch)
+ run_specific_rebase
+ die "BUG: run_specific_rebase is not supposed to return here"
+ ;;
esac
# Make sure no rebase is in progress