git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] bash-completions: add --[no-]graph-indent

From
Pablo Sabater <pabloosabaterr@gmail.com>
Date
Oct 29, 2026, 13:45 UTC
Message-ID
<DMHD8RCO7V74.2BK7C9T4HNLHO@gmail.com>
In-Reply-To
<63106e1dec45e82c7f132a18816b2d1fffb52752.1791921033.git.mroik@delayed.space>
[Cc'd Toon because of the mention]
On Tue Oct 13, 2026 at 8:50 PM WEST, Mirko Faina wrote:
Show 17 quoted lines
> 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)

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

Thanks, Pablo

Previous: Mirko FainaNext: Ben Knoble
Message 3 of 9 in “bash-completions: add --[no-]graph-indent”
  1. bash-completions: add --[no-]graph-indentMirko Faina, Oct 13, 2026
  2. Mirko FainaOct 29, 2026
  3. Pablo SabaterOct 29, 2026
  4. Ben KnobleOct 29, 2026
  5. Mirko FainaNov 2, 2026
  6. Toon ClaesNov 9, 2026
  7. completions: add some missing options for git logMirko Faina, Nov 2, 2026
  8. Toon ClaesNov 9, 2026
  9. Junio C HamanoNov 9, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.