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:
Junio C Hamano
2018-03-06 14:54:02 -08:00
12 changed files with 130 additions and 11 deletions

View File

@ -439,7 +439,7 @@ __git_refs ()
track=""
;;
*)
for i in HEAD FETCH_HEAD ORIG_HEAD MERGE_HEAD; do
for i in HEAD FETCH_HEAD ORIG_HEAD MERGE_HEAD REBASE_HEAD; do
case "$i" in
$match*)
if [ -e "$dir/$i" ]; then
@ -1077,7 +1077,7 @@ _git_am ()
{
__git_find_repo_path
if [ -d "$__git_repo_path"/rebase-apply ]; then
__gitcomp "--skip --continue --resolved --abort --quit"
__gitcomp "--skip --continue --resolved --abort --quit --show-current-patch"
return
fi
case "$cur" in
@ -1992,11 +1992,11 @@ _git_rebase ()
{
__git_find_repo_path
if [ -f "$__git_repo_path"/rebase-merge/interactive ]; then
__gitcomp "--continue --skip --abort --quit --edit-todo"
__gitcomp "--continue --skip --abort --quit --edit-todo --show-current-patch"
return
elif [ -d "$__git_repo_path"/rebase-apply ] || \
[ -d "$__git_repo_path"/rebase-merge ]; then
__gitcomp "--continue --skip --abort --quit"
__gitcomp "--continue --skip --abort --quit --show-current-patch"
return
fi
__git_complete_strategy && return