Skip to content

Commit a4adb60

Browse files
committed
Merge branch 'rk/completion-stash'
The command line completion script (in contrib/) learned that "git stash show" takes the options "git diff" takes. * rk/completion-stash: git-completion.bash: stash-show: complete $__git_diff_common_options git-completion.bash: __git_diff_common_options: add --[no-]patch
2 parents dc53e7b + 3a35d91 commit a4adb60

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

contrib/completion/git-completion.bash

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1688,6 +1688,7 @@ __git_diff_common_options="--stat --numstat --shortstat --summary
16881688
--submodule --submodule= --ignore-submodules
16891689
--indent-heuristic --no-indent-heuristic
16901690
--textconv --no-textconv
1691+
--patch --no-patch
16911692
"
16921693

16931694
_git_diff ()
@@ -2031,11 +2032,9 @@ _git_log ()
20312032
--no-walk --no-walk= --do-walk
20322033
--parents --children
20332034
--expand-tabs --expand-tabs= --no-expand-tabs
2034-
--patch
20352035
$merge
20362036
$__git_diff_common_options
20372037
--pickaxe-all --pickaxe-regex
2038-
--patch --no-patch
20392038
"
20402039
return
20412040
;;
@@ -2938,7 +2937,7 @@ _git_show ()
29382937
;;
29392938
--*)
29402939
__gitcomp "--pretty= --format= --abbrev-commit --no-abbrev-commit
2941-
--oneline --show-signature --patch
2940+
--oneline --show-signature
29422941
--expand-tabs --expand-tabs= --no-expand-tabs
29432942
$__git_diff_common_options
29442943
"
@@ -3021,7 +3020,10 @@ _git_stash ()
30213020
list,--*)
30223021
__gitcomp "--name-status --oneline --patch-with-stat"
30233022
;;
3024-
show,--*|branch,--*)
3023+
show,--*)
3024+
__gitcomp "$__git_diff_common_options"
3025+
;;
3026+
branch,--*)
30253027
;;
30263028
branch,*)
30273029
if [ $cword -eq 3 ]; then

0 commit comments

Comments
 (0)