{"thread":{"id":"66522","subject":"[PATCH] bash-completions: add --[no-]graph-indent","startedAt":"2026-10-13T19:50:49Z","lastAt":"2026-11-09T20:21:37Z","messageCount":9,"participants":["Mirko Faina","Pablo Sabater","Ben Knoble","Toon Claes","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"554901","messageId":"63106e1dec45e82c7f132a18816b2d1fffb52752.1791921033.git.mroik@delayed.space","threadId":"66522","inReplyTo":null,"subject":"[PATCH] bash-completions: add --[no-]graph-indent","fromName":"Mirko Faina","fromEmail":"mroik@delayed.space","sentAt":"2026-10-13T19:50:49Z","receivedAt":"2026-10-13T19:50:49Z","isPatch":true,"sender":{"key":"mroik@delayed.space","avatar":"https://avatars.githubusercontent.com/u/25752903?v=4"},"body":"Add missing completion for \"git log --graph-indent\" and \"git log\n--no-graph-indent\".\n\nSigned-off-by: Mirko Faina <mroik@delayed.space>\n---\n contrib/completion/git-completion.bash | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex c3a49e2e22..2348a3cfb9 100644\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -2298,6 +2298,7 @@ __git_log_common_options=\"\n \t--right-only --show-linear-break\n \t--show-notes-by-default --show-pulls\n \t--since-as-filter --single-worktree\n+\t--graph-indent --no-graph-indent\n \"\n # Options that go well for log and gitk (not shortlog)\n __git_log_gitk_options=\"\n\nbase-commit: 6de20f6092dcf9bdb1c8efe03db4b70c82b423dd\n-- \n2.56.0\n\n\n"},{"id":"556769","messageId":"auM4thx0rLN1-sUi@exploit","threadId":"66522","inReplyTo":"63106e1dec45e82c7f132a18816b2d1fffb52752.1791921033.git.mroik@delayed.space","subject":"Re: [PATCH] bash-completions: add --[no-]graph-indent","fromName":"Mirko Faina","fromEmail":"mroik@delayed.space","sentAt":"2026-10-29T12:16:59Z","receivedAt":"2026-10-29T12:16:59Z","isPatch":true,"sender":{"key":"mroik@delayed.space","avatar":"https://avatars.githubusercontent.com/u/25752903?v=4"},"body":"Cc'ing Pablo since he was the author of the topic related to\n\"--graph-indent\".\n\n"},{"id":"556783","messageId":"DMHD8RCO7V74.2BK7C9T4HNLHO@gmail.com","threadId":"66522","inReplyTo":"63106e1dec45e82c7f132a18816b2d1fffb52752.1791921033.git.mroik@delayed.space","subject":"Re: [PATCH] bash-completions: add --[no-]graph-indent","fromName":"Pablo Sabater","fromEmail":"pabloosabaterr@gmail.com","sentAt":"2026-10-29T13:45:15Z","receivedAt":"2026-10-29T13:45:15Z","isPatch":true,"sender":{"key":"pabloosabaterr@gmail.com","avatar":"https://avatars.githubusercontent.com/u/63864637?v=4"},"body":"[Cc'd Toon because of the mention]\n\nOn Tue Oct 13, 2026 at 8:50 PM WEST, Mirko Faina wrote:\n> Add missing completion for \"git log --graph-indent\" and \"git log\n> --no-graph-indent\".\n>\n> Signed-off-by: Mirko Faina <mroik@delayed.space>\n> ---\n>  contrib/completion/git-completion.bash | 1 +\n>  1 file changed, 1 insertion(+)\n>\n> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\n> index c3a49e2e22..2348a3cfb9 100644\n> --- a/contrib/completion/git-completion.bash\n> +++ b/contrib/completion/git-completion.bash\n> @@ -2298,6 +2298,7 @@ __git_log_common_options=\"\n>  \t--right-only --show-linear-break\n>  \t--show-notes-by-default --show-pulls\n>  \t--since-as-filter --single-worktree\n> +\t--graph-indent --no-graph-indent\n\nThanks for Cc'ing.\n\nI didn't know about this so I completely forgot to add it, however from\nwhat I read, this is the __git_log_common_options and I'm not sure if\nthis is a \"common\" opt, as I don't even see --graph here.\n\nI searched where --graph is, and it's here:\n\nl 2383-2409 'git-completion.bash'\n\n\t__gitcomp \"\n[more opts]\n\t\t--graph\n[more opts]\n\t\t$merge\n\t\t$__git_diff_common_options\n\t\t\"\n\treturn\n\t;;\n\nI think it would fit better here (not sure, I just quickly skimmed the\nfile).\n\nAlso, I missed this for the --graph-lane-limit option so maybe it should\nbe added too?\n\nMy main doubt is, both these options proposed (yours and\n--graph-lane-limit) are --graph dependent, which means if someone\nautocompletes them but doesn't use --graph, they will get an error\nsaying that --graph is needed. I'd say we do what other --graph\ndependent options do, but AFAIK these two are the only ones.\n\nFrom Toon's Git Merge talk, more options for --graph option will be\ndeveloped so we should maybe think about how to do it in a way that \ndoesn't autocomplete if it's going to error? (maybe that does exist,\ngiven the multiple options that depend on other options)\n\n>  \"\n>  # Options that go well for log and gitk (not shortlog)\n>  __git_log_gitk_options=\"\n>\n> base-commit: 6de20f6092dcf9bdb1c8efe03db4b70c82b423dd\n\nThanks,\nPablo\n\n\n"},{"id":"556788","messageId":"E1710743-1244-4959-81AC-DAA4DFE4B702@gmail.com","threadId":"66522","inReplyTo":"DMHD8RCO7V74.2BK7C9T4HNLHO@gmail.com","subject":"Re: [PATCH] bash-completions: add --[no-]graph-indent","fromName":"Ben Knoble","fromEmail":"ben.knoble@gmail.com","sentAt":"2026-10-29T14:17:25Z","receivedAt":"2026-10-29T14:17:25Z","isPatch":true,"sender":{"key":"ben.knoble@gmail.com","avatar":"https://avatars.githubusercontent.com/u/22802209?v=4"},"body":"\n> Le 29 oct. 2026 à 09:54, Pablo Sabater <pabloosabaterr@gmail.com> a écrit :\n> \n> ﻿[Cc'd Toon because of the mention]\n> \n>> On Tue Oct 13, 2026 at 8:50 PM WEST, Mirko Faina wrote:\n>> Add missing completion for \"git log --graph-indent\" and \"git log\n>> --no-graph-indent\".\n>> \n>> Signed-off-by: Mirko Faina <mroik@delayed.space>\n>> ---\n>> contrib/completion/git-completion.bash | 1 +\n>> 1 file changed, 1 insertion(+)\n>> \n>> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\n>> index c3a49e2e22..2348a3cfb9 100644\n>> --- a/contrib/completion/git-completion.bash\n>> +++ b/contrib/completion/git-completion.bash\n>> @@ -2298,6 +2298,7 @@ __git_log_common_options=\"\n>>    --right-only --show-linear-break\n>>    --show-notes-by-default --show-pulls\n>>    --since-as-filter --single-worktree\n>> +    --graph-indent --no-graph-indent\n> \n> Thanks for Cc'ing.\n> \n> I didn't know about this so I completely forgot to add it, however from\n> what I read, this is the __git_log_common_options and I'm not sure if\n> this is a \"common\" opt, as I don't even see --graph here.\n\nFrom memory, I think « common » means « useful for multiple\ncompletions » (common to multiple commands), not\n« commonly typed »?\n\n> I searched where --graph is, and it's here:\n> \n> l 2383-2409 'git-completion.bash'\n> \n>    __gitcomp \"\n> [more opts]\n>        --graph\n> [more opts]\n>        $merge\n>        $__git_diff_common_options\n>        \"\n>    return\n>    ;;\n> \n> I think it would fit better here (not sure, I just quickly skimmed the\n> file).\n> \n> Also, I missed this for the --graph-lane-limit option so maybe it should\n> be added too?\n> \n> My main doubt is, both these options proposed (yours and\n> --graph-lane-limit) are --graph dependent, which means if someone\n> autocompletes them but doesn't use --graph, they will get an error\n> saying that --graph is needed. I'd say we do what other --graph\n> dependent options do, but AFAIK these two are the only ones.\n> \n> From Toon's Git Merge talk, more options for --graph option will be\n> developed so we should maybe think about how to do it in a way that\n> doesn't autocomplete if it's going to error? (maybe that does exist,\n> given the multiple options that depend on other options)\n\nSounds reasonable, though I also wonder if these commands \ncould eventually be taught to give their own completion help\nlike all the parseopt users.  \n"},{"id":"557231","messageId":"aujlNwM6X3BLz22V@exploit","threadId":"66522","inReplyTo":"DMHD8RCO7V74.2BK7C9T4HNLHO@gmail.com","subject":"Re: [PATCH] bash-completions: add --[no-]graph-indent","fromName":"Mirko Faina","fromEmail":"mroik@delayed.space","sentAt":"2026-11-02T19:53:33Z","receivedAt":"2026-11-02T19:53:33Z","isPatch":true,"sender":{"key":"mroik@delayed.space","avatar":"https://avatars.githubusercontent.com/u/25752903?v=4"},"body":"On Thu, Oct 29, 2026 at 01:45:15PM +0000, Pablo Sabater wrote:\n> I didn't know about this so I completely forgot to add it, however from\n> what I read, this is the __git_log_common_options and I'm not sure if\n> this is a \"common\" opt, as I don't even see --graph here.\n> \n> I searched where --graph is, and it's here:\n> \n> l 2383-2409 'git-completion.bash'\n> \n> \t__gitcomp \"\n> [more opts]\n> \t\t--graph\n> [more opts]\n> \t\t$merge\n> \t\t$__git_diff_common_options\n> \t\t\"\n> \treturn\n> \t;;\n> \n> I think it would fit better here (not sure, I just quickly skimmed the\n> file).\n\nYes, you're right. I was on automatic mode when choosing where to place\nit and defaulted to the place where I put an option of mine that worked\nfor log. Since this is specific to \"git log\" I'll place it where you\nsuggested.\n\n> Also, I missed this for the --graph-lane-limit option so maybe it should\n> be added too?\n\nNot familiar with the option but will look into it, might as well add\nit.\n\n> My main doubt is, both these options proposed (yours and\n> --graph-lane-limit) are --graph dependent, which means if someone\n> autocompletes them but doesn't use --graph, they will get an error\n> saying that --graph is needed. I'd say we do what other --graph\n> dependent options do, but AFAIK these two are the only ones.\n> \n> From Toon's Git Merge talk, more options for --graph option will be\n> developed so we should maybe think about how to do it in a way that \n> doesn't autocomplete if it's going to error? (maybe that does exist,\n> given the multiple options that depend on other options)\n\nFrom what I can tell the only reason we options through bash-completions\nis because these options are not handled by the parse-options.h\nmachinery. Ideally we'd want to port these options to that? I'm assuming\nthe reason it wasn't was because of the common options.\n\nWith the parse-options.h machinery you can't tell which option depends\non which other, so it just shows every option available for a command\nwhen autocompleting. I'm not sure it's worth it to implement such a\nfeature with bash-completions when the parse-options.h machinery\ndoesn't.\n\nThank you for the review, will reroll.\nMirko Faina\n\n"},{"id":"557239","messageId":"5735bacbd5c2c48eddafb43f75f7ddcdf402ff17.1793656021.git.mroik@delayed.space","threadId":"66522","inReplyTo":"63106e1dec45e82c7f132a18816b2d1fffb52752.1791921033.git.mroik@delayed.space","subject":"[PATCH v2] completions: add some missing options for git log","fromName":"Mirko Faina","fromEmail":"mroik@delayed.space","sentAt":"2026-11-02T21:47:49Z","receivedAt":"2026-11-02T21:47:49Z","isPatch":true,"sender":{"key":"mroik@delayed.space","avatar":"https://avatars.githubusercontent.com/u/25752903?v=4"},"body":"Some options for \"git log\" are missing in bash-completions,\n--graph-lane-limit introduced in [1] and --[no-]graph-indent introduced\nin [2].\n\nTeach bash-completions to autocomplete these options.\n\n[1] f756a3c78d (graph: add --graph-lane-limit option, 2026-03-28)\n[2] e9b5720bef (graph: add --[no-]graph-indent and log.graphIndent, 2026-07-14)\n\nSigned-off-by: Mirko Faina <mroik@delayed.space>\n---\n contrib/completion/git-completion.bash | 2 ++\n 1 file changed, 2 insertions(+)\n\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex c3a49e2e22..eab6309a69 100644\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -2395,6 +2395,8 @@ __git_complete_log_opts ()\n \t\t\t--cherry-mark\n \t\t\t--cherry-pick\n \t\t\t--graph\n+\t\t\t--graph-indent --no-graph-indent\n+\t\t\t--graph-lane-limit=\n \t\t\t--decorate --decorate= --no-decorate\n \t\t\t--walk-reflogs\n \t\t\t--no-walk --no-walk= --do-walk\n\nbase-commit: 6de20f6092dcf9bdb1c8efe03db4b70c82b423dd\n-- \n2.56.0\n\n\n"},{"id":"557956","messageId":"87zevixbbo.fsf@dev.null.iotcl.com.invalid","threadId":"66522","inReplyTo":"aujlNwM6X3BLz22V@exploit","subject":"Re: [PATCH] bash-completions: add --[no-]graph-indent","fromName":"Toon Claes","fromEmail":"toon@iotcl.com","sentAt":"2026-11-09T15:40:27Z","receivedAt":"2026-11-09T15:40:27Z","isPatch":true,"sender":{"key":"toon@iotcl.com","avatar":"https://avatars.githubusercontent.com/u/121621?v=4"},"body":"Mirko Faina <mroik@delayed.space> writes:\n\n> On Thu, Oct 29, 2026 at 01:45:15PM +0000, Pablo Sabater wrote:\n>> I didn't know about this so I completely forgot to add it, however from\n>> what I read, this is the __git_log_common_options and I'm not sure if\n>> this is a \"common\" opt, as I don't even see --graph here.\n>> \n>> I searched where --graph is, and it's here:\n>> \n>> l 2383-2409 'git-completion.bash'\n>> \n>> \t__gitcomp \"\n>> [more opts]\n>> \t\t--graph\n>> [more opts]\n>> \t\t$merge\n>> \t\t$__git_diff_common_options\n>> \t\t\"\n>> \treturn\n>> \t;;\n>> \n>> I think it would fit better here (not sure, I just quickly skimmed the\n>> file).\n>\n> Yes, you're right. I was on automatic mode when choosing where to place\n> it and defaulted to the place where I put an option of mine that worked\n> for log. Since this is specific to \"git log\" I'll place it where you\n> suggested.\n>\n>> Also, I missed this for the --graph-lane-limit option so maybe it should\n>> be added too?\n>\n> Not familiar with the option but will look into it, might as well add\n> it.\n>\n>> My main doubt is, both these options proposed (yours and\n>> --graph-lane-limit) are --graph dependent, which means if someone\n>> autocompletes them but doesn't use --graph, they will get an error\n>> saying that --graph is needed. I'd say we do what other --graph\n>> dependent options do, but AFAIK these two are the only ones.\n>> \n>> From Toon's Git Merge talk, more options for --graph option will be\n>> developed so we should maybe think about how to do it in a way that \n>> doesn't autocomplete if it's going to error? (maybe that does exist,\n>> given the multiple options that depend on other options)\n>\n> From what I can tell the only reason we options through bash-completions\n> is because these options are not handled by the parse-options.h\n> machinery. Ideally we'd want to port these options to that? I'm assuming\n> the reason it wasn't was because of the common options.\n>\n> With the parse-options.h machinery you can't tell which option depends\n> on which other, so it just shows every option available for a command\n> when autocompleting. I'm not sure it's worth it to implement such a\n> feature with bash-completions when the parse-options.h machinery\n> doesn't.\n\nYes, I agree. It would be cool if parse-options.h would be smarter in\nthis regard, but for now that's not the case, and I'm fine with that.\nI'm pretty sure (although I cannot think of any right now) there are\nother options (for other commands) that only work if combined.\n\nI appreciate thinking about this, but that's something for the future.\n\n> Thank you for the review, will reroll.\n> Mirko Faina\n\n-- \nLaters,\nToon\n\n"},{"id":"557957","messageId":"87wlqmxb9p.fsf@dev.null.iotcl.com.invalid","threadId":"66522","inReplyTo":"5735bacbd5c2c48eddafb43f75f7ddcdf402ff17.1793656021.git.mroik@delayed.space","subject":"Re: [PATCH v2] completions: add some missing options for git log","fromName":"Toon Claes","fromEmail":"toon@iotcl.com","sentAt":"2026-11-09T15:41:38Z","receivedAt":"2026-11-09T15:41:38Z","isPatch":true,"sender":{"key":"toon@iotcl.com","avatar":"https://avatars.githubusercontent.com/u/121621?v=4"},"body":"Mirko Faina <mroik@delayed.space> writes:\n\n> Some options for \"git log\" are missing in bash-completions,\n> --graph-lane-limit introduced in [1] and --[no-]graph-indent introduced\n> in [2].\n>\n> Teach bash-completions to autocomplete these options.\n>\n> [1] f756a3c78d (graph: add --graph-lane-limit option, 2026-03-28)\n> [2] e9b5720bef (graph: add --[no-]graph-indent and log.graphIndent, 2026-07-14)\n>\n> Signed-off-by: Mirko Faina <mroik@delayed.space>\n> ---\n>  contrib/completion/git-completion.bash | 2 ++\n>  1 file changed, 2 insertions(+)\n>\n> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\n> index c3a49e2e22..eab6309a69 100644\n> --- a/contrib/completion/git-completion.bash\n> +++ b/contrib/completion/git-completion.bash\n> @@ -2395,6 +2395,8 @@ __git_complete_log_opts ()\n>  \t\t\t--cherry-mark\n>  \t\t\t--cherry-pick\n>  \t\t\t--graph\n> +\t\t\t--graph-indent --no-graph-indent\n> +\t\t\t--graph-lane-limit=\n>  \t\t\t--decorate --decorate= --no-decorate\n>  \t\t\t--walk-reflogs\n>  \t\t\t--no-walk --no-walk= --do-walk\n>\n> base-commit: 6de20f6092dcf9bdb1c8efe03db4b70c82b423dd\n> -- \n> 2.56.0\n\nI'm fine with these changes, they do what we want them to. Looks good to\nme. \n\n-- \nLaters,\nToon\n\n"},{"id":"557987","messageId":"xmqqld71ycvi.fsf@gitster.g","threadId":"66522","inReplyTo":"87wlqmxb9p.fsf@dev.null.iotcl.com.invalid","subject":"Re: [PATCH v2] completions: add some missing options for git log","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-11-09T20:21:37Z","receivedAt":"2026-11-09T20:21:37Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Toon Claes <toon@iotcl.com> writes:\n\n> Mirko Faina <mroik@delayed.space> writes:\n>\n>> Some options for \"git log\" are missing in bash-completions,\n>> --graph-lane-limit introduced in [1] and --[no-]graph-indent introduced\n>> in [2].\n>\n> I'm fine with these changes, they do what we want them to. Looks good to\n> me. \n\nYeah, this looks good to me, too.  Thanks, both.\n\n"}]}