{"thread":{"id":"61528","subject":"[PATCH] doc: note that interactive.singleKey is disabled by default","startedAt":"2024-05-22T07:34:23Z","lastAt":"2024-05-22T20:50:41Z","messageCount":6,"participants":["Dragan Simic","Rubén Justo","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"495274","messageId":"3141fe9f7328a97bf3818748421f6ae929120626.1716363167.git.dsimic@manjaro.org","threadId":"61528","inReplyTo":null,"subject":"[PATCH] doc: note that interactive.singleKey is disabled by default","fromName":"Dragan Simic","fromEmail":"dsimic@manjaro.org","sentAt":"2024-05-22T07:34:16Z","receivedAt":"2024-05-22T07:34:23Z","isPatch":true,"sender":{"key":"dsimic@manjaro.org","avatar":null},"body":"Make it clear that the interactive.singleKey configuration option is disabled\nby default.  This should eliminate any associated doubts.\n\nSigned-off-by: Dragan Simic <dsimic@manjaro.org>\n---\n Documentation/config/interactive.txt | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/Documentation/config/interactive.txt b/Documentation/config/interactive.txt\nindex 5cc26555f19a..067496d77cea 100644\n--- a/Documentation/config/interactive.txt\n+++ b/Documentation/config/interactive.txt\n@@ -5,6 +5,7 @@ interactive.singleKey::\n \tlinkgit:git-add[1], linkgit:git-checkout[1],\n \tlinkgit:git-restore[1], linkgit:git-commit[1],\n \tlinkgit:git-reset[1], and linkgit:git-stash[1].\n+\tThis is disabled by default.\n \n interactive.diffFilter::\n \tWhen an interactive command (such as `git add --patch`) shows\n"},{"id":"495308","messageId":"f7cf64cc-1458-49db-979f-eb4c70223620@gmail.com","threadId":"61528","inReplyTo":"3141fe9f7328a97bf3818748421f6ae929120626.1716363167.git.dsimic@manjaro.org","subject":"Re: [PATCH] doc: note that interactive.singleKey is disabled by default","fromName":"Rubén Justo","fromEmail":"rjusto@gmail.com","sentAt":"2024-05-22T17:31:19Z","receivedAt":"2024-05-22T17:31:36Z","isPatch":true,"sender":{"key":"rjusto@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5685487?v=4"},"body":"On Wed, May 22, 2024 at 09:34:16AM +0200, Dragan Simic wrote:\n> Make it clear that the interactive.singleKey configuration option is disabled\n> by default.  This should eliminate any associated doubts.\n> \n> Signed-off-by: Dragan Simic <dsimic@manjaro.org>\n> ---\n>  Documentation/config/interactive.txt | 1 +\n>  1 file changed, 1 insertion(+)\n> \n> diff --git a/Documentation/config/interactive.txt b/Documentation/config/interactive.txt\n> index 5cc26555f19a..067496d77cea 100644\n> --- a/Documentation/config/interactive.txt\n> +++ b/Documentation/config/interactive.txt\n> @@ -5,6 +5,7 @@ interactive.singleKey::\n>  \tlinkgit:git-add[1], linkgit:git-checkout[1],\n>  \tlinkgit:git-restore[1], linkgit:git-commit[1],\n>  \tlinkgit:git-reset[1], and linkgit:git-stash[1].\n> +\tThis is disabled by default.\n\nI'm on the fence if it needs to be said explicitly.  But, I'll add\nthat it has been so since it was introduced in ca6ac7f135 (add -p:\nprompt for single characters, 2009-02-05).\n\nThank you for your attention to detail.\n\n>  \n>  interactive.diffFilter::\n>  \tWhen an interactive command (such as `git add --patch`) shows\n\n\n"},{"id":"495311","messageId":"xmqq34q966qq.fsf@gitster.g","threadId":"61528","inReplyTo":"3141fe9f7328a97bf3818748421f6ae929120626.1716363167.git.dsimic@manjaro.org","subject":"Re: [PATCH] doc: note that interactive.singleKey is disabled by default","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-05-22T18:28:45Z","receivedAt":"2024-05-22T18:28:47Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Dragan Simic <dsimic@manjaro.org> writes:\n\n> diff --git a/Documentation/config/interactive.txt b/Documentation/config/interactive.txt\n> index 5cc26555f19a..067496d77cea 100644\n> --- a/Documentation/config/interactive.txt\n> +++ b/Documentation/config/interactive.txt\n> @@ -5,6 +5,7 @@ interactive.singleKey::\n>  \tlinkgit:git-add[1], linkgit:git-checkout[1],\n>  \tlinkgit:git-restore[1], linkgit:git-commit[1],\n>  \tlinkgit:git-reset[1], and linkgit:git-stash[1].\n> +\tThis is disabled by default.\n\nHmph, an optional configuration is optional because the lack of it\nmeans the feature behind it does not trigger.\n\nWhile it makes tons of sense to mention what the default is when\nthere are more than true or false choices (e.g. \"defaults to never,\namong possible choices never/local/remote/always\"), or if it\ndefaults to true and the knob is to opt out of it, it feels like it\nadds unnecesary noise to say \"defaults to off\" for a configuration\nthat is clearly a Boolean.\n\nSo I dunno.\n"},{"id":"495314","messageId":"54c318f42ce63f0575ea48f3dc1e8361@manjaro.org","threadId":"61528","inReplyTo":"xmqq34q966qq.fsf@gitster.g","subject":"Re: [PATCH] doc: note that interactive.singleKey is disabled by default","fromName":"Dragan Simic","fromEmail":"dsimic@manjaro.org","sentAt":"2024-05-22T18:52:43Z","receivedAt":"2024-05-22T18:52:45Z","isPatch":true,"sender":{"key":"dsimic@manjaro.org","avatar":null},"body":"On 2024-05-22 20:28, Junio C Hamano wrote:\n> Dragan Simic <dsimic@manjaro.org> writes:\n> \n>> diff --git a/Documentation/config/interactive.txt \n>> b/Documentation/config/interactive.txt\n>> index 5cc26555f19a..067496d77cea 100644\n>> --- a/Documentation/config/interactive.txt\n>> +++ b/Documentation/config/interactive.txt\n>> @@ -5,6 +5,7 @@ interactive.singleKey::\n>>  \tlinkgit:git-add[1], linkgit:git-checkout[1],\n>>  \tlinkgit:git-restore[1], linkgit:git-commit[1],\n>>  \tlinkgit:git-reset[1], and linkgit:git-stash[1].\n>> +\tThis is disabled by default.\n> \n> Hmph, an optional configuration is optional because the lack of it\n> means the feature behind it does not trigger.\n> \n> While it makes tons of sense to mention what the default is when\n> there are more than true or false choices (e.g. \"defaults to never,\n> among possible choices never/local/remote/always\"), or if it\n> defaults to true and the knob is to opt out of it, it feels like it\n> adds unnecesary noise to say \"defaults to off\" for a configuration\n> that is clearly a Boolean.\n> \n> So I dunno.\n\nLet's have a look at a rather suitable (and to me, a bit inspiring)\nexcerpt from the git-config(1) man page:\n\n   interactive.singleKey\n      In interactive commands, allow the user to provide one-letter\n      input with a single key (i.e., without hitting enter).\n      Currently this is used by the --patch mode of git-add(1),\n      git-checkout(1), git-restore(1), git-commit(1), git-reset(1),\n      and git-stash(1). Note that this setting is silently ignored\n      if portable keystroke input is not available; requires the\n      Perl module Term::ReadKey.\n\n   [...]\n\n   log.abbrevCommit\n      If true, makes git-log(1), git-show(1), and git-whatchanged(1)\n      assume --abbrev-commit. You may override this option with\n      --no-abbrev-commit.\n\nWith this in mind, I think that rewording the opening sentence for\nthe description of interactive.singleKey like this would make sense:\n\n   interactive.singleKey\n      If true, allow the user to provide one-letter input with a\n      single key (i.e., without hitting Enter key) in interactive\n      commands.\n      [...]\n\nThoughts?  It would be more consistent and a bit more clear, without\nputting too much stress on the actual default value.\n"},{"id":"495326","messageId":"xmqqttip379x.fsf@gitster.g","threadId":"61528","inReplyTo":"54c318f42ce63f0575ea48f3dc1e8361@manjaro.org","subject":"Re: [PATCH] doc: note that interactive.singleKey is disabled by default","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-05-22T20:45:30Z","receivedAt":"2024-05-22T20:45:32Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Dragan Simic <dsimic@manjaro.org> writes:\n\n>   interactive.singleKey\n>      If true, allow the user to provide one-letter input with a\n>      single key (i.e., without hitting Enter key) in interactive\n>      commands.\n>      [...]\n>\n> Thoughts?  It would be more consistent and a bit more clear, without\n> putting too much stress on the actual default value.\n\n\"When set to true\" or \"when configured to true\" is much better than\n\"defaults to true\".\n\nI am ambivalent about \"If true\", though.  It still leaves it open\nfor some mysterious \"default\" mechanism giving the value true\nwithout user doing anything explicitly.\n\n"},{"id":"495327","messageId":"a04bc0c38ad287b892c7dde37d782f12@manjaro.org","threadId":"61528","inReplyTo":"xmqqttip379x.fsf@gitster.g","subject":"Re: [PATCH] doc: note that interactive.singleKey is disabled by default","fromName":"Dragan Simic","fromEmail":"dsimic@manjaro.org","sentAt":"2024-05-22T20:50:38Z","receivedAt":"2024-05-22T20:50:41Z","isPatch":true,"sender":{"key":"dsimic@manjaro.org","avatar":null},"body":"On 2024-05-22 22:45, Junio C Hamano wrote:\n> Dragan Simic <dsimic@manjaro.org> writes:\n> \n>>   interactive.singleKey\n>>      If true, allow the user to provide one-letter input with a\n>>      single key (i.e., without hitting Enter key) in interactive\n>>      commands.\n>>      [...]\n>> \n>> Thoughts?  It would be more consistent and a bit more clear, without\n>> putting too much stress on the actual default value.\n> \n> \"When set to true\" or \"when configured to true\" is much better than\n> \"defaults to true\".\n> \n> I am ambivalent about \"If true\", though.  It still leaves it open\n> for some mysterious \"default\" mechanism giving the value true\n> without user doing anything explicitly.\n\nMakes sense.  I'll send the v2 of this patch with \"when set to true\"\nin use, possibly with another patch that addresses already existing\ninstances of \"if true\", for consistency.\n"}]}