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 <avoidr@posteo.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Robert Karszniewicz committed
Oct 7, 2020 at 00:06 UTC
8a1bb7ee9ddee1bb32e08d153fbc4f6c6cc2586d
1 file changed
+2
-3
contrib/completion/git-completion.bash
+2
-3
@@ -1688,6 +1688,7 @@ __git_diff_common_options="--stat --numstat --shortstat --summary
1688
--submodule --submodule= --ignore-submodules
1689
--indent-heuristic --no-indent-heuristic
1690
--textconv --no-textconv
1691
+ --patch --no-patch
1692
"
1693
1694
_git_diff ()
@@ -2031,11 +2032,9 @@ _git_log ()
2032
--no-walk --no-walk= --do-walk
2033
--parents --children
2034
--expand-tabs --expand-tabs= --no-expand-tabs
2034
- --patch
2035
$merge
2036
$__git_diff_common_options
2037
--pickaxe-all --pickaxe-regex
2038
- --patch --no-patch
2038
"
2039
return
2040
;;
@@ -2938,7 +2937,7 @@ _git_show ()
2937
;;
2938
--*)
2939
__gitcomp "--pretty= --format= --abbrev-commit --no-abbrev-commit
2941
- --oneline --show-signature --patch
2940
+ --oneline --show-signature
2941
--expand-tabs --expand-tabs= --no-expand-tabs
2942
$__git_diff_common_options
2943
"