summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-03-09 18:21:19 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-03-09 18:21:19 (GMT)
commit0e0d717537547e8fcba441e4f65237c7fd227a34 (patch)
tree1cb5ad50202b03853e3baef2b26fd13a29df45ac /contrib
parent9b7f726dfcf35d3a2dbfd150b64ca9b01e810b44 (diff)
parentaa416b22ea73321aba94c3c96db0491fb25ea7ea (diff)
downloadgit-0e0d717537547e8fcba441e4f65237c7fd227a34.zip
git-0e0d717537547e8fcba441e4f65237c7fd227a34.tar.gz
git-0e0d717537547e8fcba441e4f65237c7fd227a34.tar.bz2
Merge branch 'pb/am-show-current-patch'
"git am --short-current-patch" is a way to show the piece of e-mail for the stopped step, which is not suitable to directly feed "git apply" (it is designed to be a good "git am" input). It learned a new option to show only the patch part. * pb/am-show-current-patch: am: support --show-current-patch=diff to retrieve .git/rebase-apply/patch am: support --show-current-patch=raw as a synonym for--show-current-patch am: convert "resume" variable to a struct parse-options: convert "command mode" to a flag parse-options: add testcases for OPT_CMDMODE()
Diffstat (limited to 'contrib')
-rw-r--r--contrib/completion/git-completion.bash5
1 files changed, 5 insertions, 0 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 1aac5a5..52e2168 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1197,6 +1197,7 @@ __git_count_arguments ()
__git_whitespacelist="nowarn warn error error-all fix"
__git_patchformat="mbox stgit stgit-series hg mboxrd"
+__git_showcurrentpatch="diff raw"
__git_am_inprogress_options="--skip --continue --resolved --abort --quit --show-current-patch"
_git_am ()
@@ -1215,6 +1216,10 @@ _git_am ()
__gitcomp "$__git_patchformat" "" "${cur##--patch-format=}"
return
;;
+ --show-current-patch=*)
+ __gitcomp "$__git_showcurrentpatch" "" "${cur##--show-current-patch=}"
+ return
+ ;;
--*)
__gitcomp_builtin am "" \
"$__git_am_inprogress_options"