]> git.ipfire.org Git - thirdparty/git.git/commitdiff
completion: add comments describing __git_diff_* globals
authorPhilippe Blain <levraiphilippeblain@gmail.com>
Mon, 26 Jun 2023 16:24:25 +0000 (16:24 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 26 Jun 2023 16:40:10 +0000 (09:40 -0700)
Add descriptive comments for '__git_diff_common_options' and
'__git_diff_difftool_options', so that it is clearer when looking at
these variables to know in which command's completion they are used.

Signed-off-by: Philippe Blain <levraiphilippeblain@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/completion/git-completion.bash

index dc95c34cc853557efd2a59a33825f834e8d934cf..90fe292459b4c0e268b7472853a44bf5f42e866d 100644 (file)
@@ -1733,6 +1733,7 @@ __git_color_moved_opts="no default plain blocks zebra dimmed-zebra"
 __git_color_moved_ws_opts="no ignore-space-at-eol ignore-space-change
                        ignore-all-space allow-indentation-change"
 
+# Options for the diff machinery (diff, log, show, stash, range-diff, ...)
 __git_diff_common_options="--stat --numstat --shortstat --summary
                        --patch-with-stat --name-only --name-status --color
                        --no-color --color-words --no-renames --check
@@ -1757,6 +1758,7 @@ __git_diff_common_options="--stat --numstat --shortstat --summary
                        --anchored=
 "
 
+# Options for diff/difftool
 __git_diff_difftool_options="--cached --staged --pickaxe-all --pickaxe-regex
                        --base --ours --theirs --no-index --relative --merge-base
                        $__git_diff_common_options"