Skip to content

Commit 8a1bb7e

Browse files
Robert Karszniewiczgitster
authored andcommitted
git-completion.bash: __git_diff_common_options: add --[no-]patch
At the same time also deduplicate those options from command completions which use $__git_diff_common_options. Signed-off-by: Robert Karszniewicz <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent d98273b commit 8a1bb7e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

contrib/completion/git-completion.bash

Lines changed: 2 additions & 3 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
"

0 commit comments

Comments
 (0)