]> git.ipfire.org Git - thirdparty/git.git/commitdiff
git-completion.bash: __git_diff_common_options: add --[no-]patch
authorRobert Karszniewicz <avoidr@posteo.de>
Tue, 6 Oct 2020 22:06:36 +0000 (00:06 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 7 Oct 2020 17:54:00 +0000 (10:54 -0700)
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>
contrib/completion/git-completion.bash

index 0a96ad87e7b6d8723175d3b97c18921ddc737d7b..f363554996d8c529d2a40f07b71fd0b24416ac68 100644 (file)
@@ -1688,6 +1688,7 @@ __git_diff_common_options="--stat --numstat --shortstat --summary
                        --submodule --submodule= --ignore-submodules
                        --indent-heuristic --no-indent-heuristic
                        --textconv --no-textconv
+                       --patch --no-patch
 "
 
 _git_diff ()
@@ -2031,11 +2032,9 @@ _git_log ()
                        --no-walk --no-walk= --do-walk
                        --parents --children
                        --expand-tabs --expand-tabs= --no-expand-tabs
-                       --patch
                        $merge
                        $__git_diff_common_options
                        --pickaxe-all --pickaxe-regex
-                       --patch --no-patch
                        "
                return
                ;;
@@ -2938,7 +2937,7 @@ _git_show ()
                ;;
        --*)
                __gitcomp "--pretty= --format= --abbrev-commit --no-abbrev-commit
-                       --oneline --show-signature --patch
+                       --oneline --show-signature
                        --expand-tabs --expand-tabs= --no-expand-tabs
                        $__git_diff_common_options
                        "