diff mbox series

[2/4] completion: complete --patch-with-raw

Message ID 1debe2fe18eec7f431f355241117afb0a5e2bf5f.1705810072.git.gitgitgadget@gmail.com (mailing list archive)
State Accepted
Commit 2e419b0578aec45ba332a5d260442c409f73091d
Headers show
Series completion: add missing 'git log' options | expand

Commit Message

Philippe Blain Jan. 21, 2024, 4:07 a.m. UTC
From: Philippe Blain <levraiphilippeblain@gmail.com>

Signed-off-by: Philippe Blain <levraiphilippeblain@gmail.com>
---
 contrib/completion/git-completion.bash | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Junio C Hamano Jan. 22, 2024, 4:09 p.m. UTC | #1
"Philippe Blain via GitGitGadget" <gitgitgadget@gmail.com> writes:

> From: Philippe Blain <levraiphilippeblain@gmail.com>
>
> Signed-off-by: Philippe Blain <levraiphilippeblain@gmail.com>
> ---
>  contrib/completion/git-completion.bash | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
> index 6108d523a11..ccb17f4ad7b 100644
> --- a/contrib/completion/git-completion.bash
> +++ b/contrib/completion/git-completion.bash
> @@ -1807,7 +1807,7 @@ __git_diff_common_options="--stat --numstat --shortstat --summary
>  			--output= --output-indicator-context=
>  			--output-indicator-new= --output-indicator-old=
>  			--ws-error-highlight=
> -			--pickaxe-all --pickaxe-regex
> +			--pickaxe-all --pickaxe-regex --patch-with-raw
>  "

Its ancient company, --patch-with-stat, is listed there, so it is
not all that wrong to include it as a suggestion, I guess.

But in the longer term, I think we would want to slim "git diff -h"
output by hiding them (no reason to touch code to remove the
support) from the "common diff options" part.  They were added as a
kludge before I realized we need more than these two combinations
and made the options --patch, --stat, and --raw cumulative.

Thanks.
diff mbox series

Patch

diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 6108d523a11..ccb17f4ad7b 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1807,7 +1807,7 @@  __git_diff_common_options="--stat --numstat --shortstat --summary
 			--output= --output-indicator-context=
 			--output-indicator-new= --output-indicator-old=
 			--ws-error-highlight=
-			--pickaxe-all --pickaxe-regex
+			--pickaxe-all --pickaxe-regex --patch-with-raw
 "
 
 # Options for diff/difftool