summaryrefslogtreecommitdiff
path: root/git-rebase.sh
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2018-02-11 09:43:27 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-02-12 22:07:59 (GMT)
commit66335298a47032267edd6d6e7a71cc337e46e995 (patch)
tree547baec4b4e0f79368fac37c21ed84e0effef503 /git-rebase.sh
parent984913a210bb6d17fb3dd515975930661a00c3b5 (diff)
downloadgit-66335298a47032267edd6d6e7a71cc337e46e995.zip
git-66335298a47032267edd6d6e7a71cc337e46e995.tar.gz
git-66335298a47032267edd6d6e7a71cc337e46e995.tar.bz2
rebase: add --show-current-patch
It is useful to see the full patch while resolving conflicts in a rebase. The only way to do it now is less .git/rebase-*/patch which could turn out to be a lot longer to type if you are in a linked worktree, or not at top-dir. On top of that, an ordinary user should not need to peek into .git directory. The new option is provided to examine the patch. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-rebase.sh')
-rwxr-xr-xgit-rebase.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/git-rebase.sh b/git-rebase.sh
index fd72a35..41c915d 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -45,6 +45,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
@@ -245,7 +246,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##--}
;;
@@ -412,6 +413,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