* [PATCH 0/4] completion: add missing 'git log' options
@ 2024-01-21 4:07 Philippe Blain via GitGitGadget
2024-01-21 4:07 ` [PATCH 1/4] completion: complete missing rev-list options Philippe Blain via GitGitGadget
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Philippe Blain via GitGitGadget @ 2024-01-21 4:07 UTC (permalink / raw)
To: git; +Cc: Philippe Blain
I noticed a few 'git log' options (old and newish) were not suggested by the
completion script, so I went through the whole list and added those that
were missing.
Philippe Blain (4):
completion: complete missing rev-list options
completion: complete --patch-with-raw
completion: complete --encoding
completion: complete missing 'git log' options
contrib/completion/git-completion.bash | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
base-commit: e02ecfcc534e2021aae29077a958dd11c3897e4c
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1650%2Fphil-blain%2Fcompletion-log-options-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1650/phil-blain/completion-log-options-v1
Pull-Request: https://github.com/git/git/pull/1650
--
gitgitgadget
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/4] completion: complete missing rev-list options
2024-01-21 4:07 [PATCH 0/4] completion: add missing 'git log' options Philippe Blain via GitGitGadget
@ 2024-01-21 4:07 ` Philippe Blain via GitGitGadget
2024-01-21 4:07 ` [PATCH 2/4] completion: complete --patch-with-raw Philippe Blain via GitGitGadget
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Philippe Blain via GitGitGadget @ 2024-01-21 4:07 UTC (permalink / raw)
To: git; +Cc: Philippe Blain, Philippe Blain
From: Philippe Blain <levraiphilippeblain@gmail.com>
Some options listed in rev-list-options.txt, and thus accepted by 'git
log' and friends, are missing from the Bash completion script.
Add them to __git_log_common_options.
Signed-off-by: Philippe Blain <levraiphilippeblain@gmail.com>
---
contrib/completion/git-completion.bash | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 8c40ade4941..6108d523a11 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -2071,6 +2071,16 @@ __git_log_common_options="
--min-age= --until= --before=
--min-parents= --max-parents=
--no-min-parents --no-max-parents
+ --alternate-refs --ancestry-path
+ --author-date-order --basic-regexp
+ --bisect --boundary --exclude-first-parent-only
+ --exclude-hidden --extended-regexp
+ --fixed-strings --grep-reflog
+ --ignore-missing --left-only --perl-regexp
+ --reflog --regexp-ignore-case --remove-empty
+ --right-only --show-linear-break
+ --show-notes-by-default --show-pulls
+ --since-as-filter --single-worktree
"
# Options that go well for log and gitk (not shortlog)
__git_log_gitk_options="
--
gitgitgadget
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/4] completion: complete --patch-with-raw
2024-01-21 4:07 [PATCH 0/4] completion: add missing 'git log' options Philippe Blain via GitGitGadget
2024-01-21 4:07 ` [PATCH 1/4] completion: complete missing rev-list options Philippe Blain via GitGitGadget
@ 2024-01-21 4:07 ` Philippe Blain via GitGitGadget
2024-01-22 16:09 ` Junio C Hamano
2024-01-21 4:07 ` [PATCH 3/4] completion: complete --encoding Philippe Blain via GitGitGadget
2024-01-21 4:07 ` [PATCH 4/4] completion: complete missing 'git log' options Philippe Blain via GitGitGadget
3 siblings, 1 reply; 6+ messages in thread
From: Philippe Blain via GitGitGadget @ 2024-01-21 4:07 UTC (permalink / raw)
To: git; +Cc: Philippe Blain, Philippe Blain
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
"
# Options for diff/difftool
--
gitgitgadget
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/4] completion: complete --encoding
2024-01-21 4:07 [PATCH 0/4] completion: add missing 'git log' options Philippe Blain via GitGitGadget
2024-01-21 4:07 ` [PATCH 1/4] completion: complete missing rev-list options Philippe Blain via GitGitGadget
2024-01-21 4:07 ` [PATCH 2/4] completion: complete --patch-with-raw Philippe Blain via GitGitGadget
@ 2024-01-21 4:07 ` Philippe Blain via GitGitGadget
2024-01-21 4:07 ` [PATCH 4/4] completion: complete missing 'git log' options Philippe Blain via GitGitGadget
3 siblings, 0 replies; 6+ messages in thread
From: Philippe Blain via GitGitGadget @ 2024-01-21 4:07 UTC (permalink / raw)
To: git; +Cc: Philippe Blain, Philippe Blain
From: Philippe Blain <levraiphilippeblain@gmail.com>
The option --encoding is supported by 'git log' and 'git show', so add
it to __git_log_show_options.
Signed-off-by: Philippe Blain <levraiphilippeblain@gmail.com>
---
contrib/completion/git-completion.bash | 1 +
1 file changed, 1 insertion(+)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index ccb17f4ad7b..a7ae2cbe55b 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -2096,6 +2096,7 @@ __git_log_shortlog_options="
# Options accepted by log and show
__git_log_show_options="
--diff-merges --diff-merges= --no-diff-merges --dd --remerge-diff
+ --encoding=
"
__git_diff_merges_opts="off none on first-parent 1 separate m combined c dense-combined cc remerge r"
--
gitgitgadget
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 4/4] completion: complete missing 'git log' options
2024-01-21 4:07 [PATCH 0/4] completion: add missing 'git log' options Philippe Blain via GitGitGadget
` (2 preceding siblings ...)
2024-01-21 4:07 ` [PATCH 3/4] completion: complete --encoding Philippe Blain via GitGitGadget
@ 2024-01-21 4:07 ` Philippe Blain via GitGitGadget
3 siblings, 0 replies; 6+ messages in thread
From: Philippe Blain via GitGitGadget @ 2024-01-21 4:07 UTC (permalink / raw)
To: git; +Cc: Philippe Blain, Philippe Blain
From: Philippe Blain <levraiphilippeblain@gmail.com>
Some options specific to 'git log' are missing from the Bash completion
script. Add them to _git_log.
Signed-off-by: Philippe Blain <levraiphilippeblain@gmail.com>
---
contrib/completion/git-completion.bash | 2 ++
1 file changed, 2 insertions(+)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index a7ae2cbe55b..2f1412d85ea 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -2180,6 +2180,8 @@ _git_log ()
--no-walk --no-walk= --do-walk
--parents --children
--expand-tabs --expand-tabs= --no-expand-tabs
+ --clear-decorations --decorate-refs=
+ --decorate-refs-exclude=
$merge
$__git_diff_common_options
"
--
gitgitgadget
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 2/4] completion: complete --patch-with-raw
2024-01-21 4:07 ` [PATCH 2/4] completion: complete --patch-with-raw Philippe Blain via GitGitGadget
@ 2024-01-22 16:09 ` Junio C Hamano
0 siblings, 0 replies; 6+ messages in thread
From: Junio C Hamano @ 2024-01-22 16:09 UTC (permalink / raw)
To: Philippe Blain via GitGitGadget; +Cc: git, Philippe Blain
"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.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-01-22 16:09 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-21 4:07 [PATCH 0/4] completion: add missing 'git log' options Philippe Blain via GitGitGadget
2024-01-21 4:07 ` [PATCH 1/4] completion: complete missing rev-list options Philippe Blain via GitGitGadget
2024-01-21 4:07 ` [PATCH 2/4] completion: complete --patch-with-raw Philippe Blain via GitGitGadget
2024-01-22 16:09 ` Junio C Hamano
2024-01-21 4:07 ` [PATCH 3/4] completion: complete --encoding Philippe Blain via GitGitGadget
2024-01-21 4:07 ` [PATCH 4/4] completion: complete missing 'git log' options Philippe Blain via GitGitGadget
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.