All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bash-completions: add --[no-]graph-indent
@ 2026-10-13 19:50 Mirko Faina
  2026-10-29 12:16 ` Mirko Faina
  2026-10-29 13:45 ` Pablo Sabater
  0 siblings, 2 replies; 4+ messages in thread
From: Mirko Faina @ 2026-10-13 19:50 UTC (permalink / raw)
  To: git; +Cc: Mirko Faina

Add missing completion for "git log --graph-indent" and "git log
--no-graph-indent".

Signed-off-by: Mirko Faina <mroik@delayed.space>
---
 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 c3a49e2e22..2348a3cfb9 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -2298,6 +2298,7 @@ __git_log_common_options="
 	--right-only --show-linear-break
 	--show-notes-by-default --show-pulls
 	--since-as-filter --single-worktree
+	--graph-indent --no-graph-indent
 "
 # Options that go well for log and gitk (not shortlog)
 __git_log_gitk_options="

base-commit: 6de20f6092dcf9bdb1c8efe03db4b70c82b423dd
-- 
2.56.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] bash-completions: add --[no-]graph-indent
  2026-10-13 19:50 [PATCH] bash-completions: add --[no-]graph-indent Mirko Faina
@ 2026-10-29 12:16 ` Mirko Faina
  2026-10-29 13:45 ` Pablo Sabater
  1 sibling, 0 replies; 4+ messages in thread
From: Mirko Faina @ 2026-10-29 12:16 UTC (permalink / raw)
  To: git; +Cc: Pablo Sabater

Cc'ing Pablo since he was the author of the topic related to
"--graph-indent".

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] bash-completions: add --[no-]graph-indent
  2026-10-13 19:50 [PATCH] bash-completions: add --[no-]graph-indent Mirko Faina
  2026-10-29 12:16 ` Mirko Faina
@ 2026-10-29 13:45 ` Pablo Sabater
  2026-10-29 14:17   ` Ben Knoble
  1 sibling, 1 reply; 4+ messages in thread
From: Pablo Sabater @ 2026-10-29 13:45 UTC (permalink / raw)
  To: Mirko Faina, git; +Cc: toon

[Cc'd Toon because of the mention]

On Tue Oct 13, 2026 at 8:50 PM WEST, Mirko Faina wrote:
> Add missing completion for "git log --graph-indent" and "git log
> --no-graph-indent".
>
> Signed-off-by: Mirko Faina <mroik@delayed.space>
> ---
>  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 c3a49e2e22..2348a3cfb9 100644
> --- a/contrib/completion/git-completion.bash
> +++ b/contrib/completion/git-completion.bash
> @@ -2298,6 +2298,7 @@ __git_log_common_options="
>  	--right-only --show-linear-break
>  	--show-notes-by-default --show-pulls
>  	--since-as-filter --single-worktree
> +	--graph-indent --no-graph-indent

Thanks for Cc'ing.

I didn't know about this so I completely forgot to add it, however from
what I read, this is the __git_log_common_options and I'm not sure if
this is a "common" opt, as I don't even see --graph here.

I searched where --graph is, and it's here:

l 2383-2409 'git-completion.bash'

	__gitcomp "
[more opts]
		--graph
[more opts]
		$merge
		$__git_diff_common_options
		"
	return
	;;

I think it would fit better here (not sure, I just quickly skimmed the
file).

Also, I missed this for the --graph-lane-limit option so maybe it should
be added too?

My main doubt is, both these options proposed (yours and
--graph-lane-limit) are --graph dependent, which means if someone
autocompletes them but doesn't use --graph, they will get an error
saying that --graph is needed. I'd say we do what other --graph
dependent options do, but AFAIK these two are the only ones.

From Toon's Git Merge talk, more options for --graph option will be
developed so we should maybe think about how to do it in a way that 
doesn't autocomplete if it's going to error? (maybe that does exist,
given the multiple options that depend on other options)

>  "
>  # Options that go well for log and gitk (not shortlog)
>  __git_log_gitk_options="
>
> base-commit: 6de20f6092dcf9bdb1c8efe03db4b70c82b423dd

Thanks,
Pablo


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] bash-completions: add --[no-]graph-indent
  2026-10-29 13:45 ` Pablo Sabater
@ 2026-10-29 14:17   ` Ben Knoble
  0 siblings, 0 replies; 4+ messages in thread
From: Ben Knoble @ 2026-10-29 14:17 UTC (permalink / raw)
  To: Pablo Sabater; +Cc: Mirko Faina, git, toon


> Le 29 oct. 2026 à 09:54, Pablo Sabater <pabloosabaterr@gmail.com> a écrit :
> 
> [Cc'd Toon because of the mention]
> 
>> On Tue Oct 13, 2026 at 8:50 PM WEST, Mirko Faina wrote:
>> Add missing completion for "git log --graph-indent" and "git log
>> --no-graph-indent".
>> 
>> Signed-off-by: Mirko Faina <mroik@delayed.space>
>> ---
>> 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 c3a49e2e22..2348a3cfb9 100644
>> --- a/contrib/completion/git-completion.bash
>> +++ b/contrib/completion/git-completion.bash
>> @@ -2298,6 +2298,7 @@ __git_log_common_options="
>>    --right-only --show-linear-break
>>    --show-notes-by-default --show-pulls
>>    --since-as-filter --single-worktree
>> +    --graph-indent --no-graph-indent
> 
> Thanks for Cc'ing.
> 
> I didn't know about this so I completely forgot to add it, however from
> what I read, this is the __git_log_common_options and I'm not sure if
> this is a "common" opt, as I don't even see --graph here.

From memory, I think « common » means « useful for multiple
completions » (common to multiple commands), not
« commonly typed »?

> I searched where --graph is, and it's here:
> 
> l 2383-2409 'git-completion.bash'
> 
>    __gitcomp "
> [more opts]
>        --graph
> [more opts]
>        $merge
>        $__git_diff_common_options
>        "
>    return
>    ;;
> 
> I think it would fit better here (not sure, I just quickly skimmed the
> file).
> 
> Also, I missed this for the --graph-lane-limit option so maybe it should
> be added too?
> 
> My main doubt is, both these options proposed (yours and
> --graph-lane-limit) are --graph dependent, which means if someone
> autocompletes them but doesn't use --graph, they will get an error
> saying that --graph is needed. I'd say we do what other --graph
> dependent options do, but AFAIK these two are the only ones.
> 
> From Toon's Git Merge talk, more options for --graph option will be
> developed so we should maybe think about how to do it in a way that
> doesn't autocomplete if it's going to error? (maybe that does exist,
> given the multiple options that depend on other options)

Sounds reasonable, though I also wonder if these commands 
could eventually be taught to give their own completion help
like all the parseopt users.  

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-10-29 14:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-13 19:50 [PATCH] bash-completions: add --[no-]graph-indent Mirko Faina
2026-10-29 12:16 ` Mirko Faina
2026-10-29 13:45 ` Pablo Sabater
2026-10-29 14:17   ` Ben Knoble

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.