summaryrefslogtreecommitdiff
path: root/git-rebase--merge.sh
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2018-02-11 16:43:27 +0700
committerJunio C Hamano <gitster@pobox.com>2018-02-12 14:07:59 -0800
commit66335298a47032267edd6d6e7a71cc337e46e995 (patch)
tree547baec4b4e0f79368fac37c21ed84e0effef503 /git-rebase--merge.sh
parent984913a210bb6d17fb3dd515975930661a00c3b5 (diff)
downloadgit-66335298a47032267edd6d6e7a71cc337e46e995.tar.gz
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--merge.sh')
-rw-r--r--git-rebase--merge.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/git-rebase--merge.sh b/git-rebase--merge.sh
index 06a4723d4d..0a96dfae37 100644
--- a/git-rebase--merge.sh
+++ b/git-rebase--merge.sh
@@ -137,6 +137,9 @@ skip)
finish_rb_merge
return
;;
+show-current-patch)
+ exec git show "$(cat "$state_dir/current")" --
+ ;;
esac
mkdir -p "$state_dir"