{"thread":{"id":"64553","subject":"[PATCH v2 0/2] Update documentation/discoverability around `scalar`","startedAt":"2025-11-29T18:32:53Z","lastAt":"2025-11-30T19:54:11Z","messageCount":8,"participants":["Matthew Hughes","Ben Knoble","Junio C Hamano","Derrick Stolee"],"isPatch":true,"patchVersion":2,"patchTotal":2},"messages":[{"id":"531448","messageId":"20251129183236.52760-1-matthewhughes934@gmail.com","threadId":"64553","inReplyTo":null,"subject":"[PATCH v2 0/2] Update documentation/discoverability around `scalar`","fromName":"Matthew Hughes","fromEmail":"matthewhughes934@gmail.com","sentAt":"2025-11-29T18:32:51Z","receivedAt":"2025-11-29T18:32:53Z","isPatch":true,"sender":{"key":"matthewhughes934@gmail.com","avatar":"https://avatars.githubusercontent.com/u/34972397?v=4"},"body":"A couple of changes following on from a discussion around the\ndiscoverability of `scalar` config changes[1].\n\nFollowing that thread, I was additionally working on a patch that would\ninvolve commenting each of the changes and why they're set. But that was\ntaking me longer than expected so I figured I get these smaller changes\nup rather than waiting to complete everything.\n\n---\nChanges in v2:\n- Add missing commit signoffs\n\nLink: https://lore.kernel.org/git/vppjutjcdglp44qvsk4qozphycyg663yrq5775zztim2oe7ty5@uttjrshb52bd/ [1]\n\nMatthew Hughes (2):\n  scalar: add comments when setting config\n  config: document `gui.GCWarning`\n\n Documentation/config/gui.adoc | 5 +++++\n scalar.c                      | 6 +++++-\n 2 files changed, 10 insertions(+), 1 deletion(-)\n\n-- \n2.52.0\n\n"},{"id":"531449","messageId":"20251129183236.52760-2-matthewhughes934@gmail.com","threadId":"64553","inReplyTo":"20251129183236.52760-1-matthewhughes934@gmail.com","subject":"[PATCH v2 1/2] scalar: add comments when setting config","fromName":"Matthew Hughes","fromEmail":"matthewhughes934@gmail.com","sentAt":"2025-11-29T18:33:07Z","receivedAt":"2025-11-29T18:33:11Z","isPatch":true,"sender":{"key":"matthewhughes934@gmail.com","avatar":"https://avatars.githubusercontent.com/u/34972397?v=4"},"body":"This is to help users understand that a change in the config was made by\n`scalar` (and not e.g. manually by themselves at some point in the\npast).\n\nAs discussed on a thread[1].\n\nLink: https://lore.kernel.org/git/aMkVqNbdgxqBJ9K4@pks.im/ [1]\nCo-authored-by: Derrick Stolee <stolee@gmail.com>\nSigned-off-by: Matthew Hughes <matthewhughes934@gmail.com>\n---\n scalar.c | 6 +++++-\n 1 file changed, 5 insertions(+), 1 deletion(-)\n\ndiff --git a/scalar.c b/scalar.c\nindex f754311627..4bdf8cf121 100644\n--- a/scalar.c\n+++ b/scalar.c\n@@ -19,6 +19,7 @@\n #include \"help.h\"\n #include \"setup.h\"\n #include \"trace2.h\"\n+#include \"path.h\"\n \n static void setup_enlistment_directory(int argc, const char **argv,\n \t\t\t\t       const char * const *usagestr,\n@@ -102,8 +103,11 @@ static int set_scalar_config(const struct scalar_config *config, int reconfigure\n \n \tif ((reconfigure && config->overwrite_on_reconfigure) ||\n \t    repo_config_get_string(the_repository, config->key, &value)) {\n+\t\tchar *cfg_file = repo_git_path(the_repository, \"config\");\n+\t\tconst char *comment = \" # set by git-scalar\";\n \t\ttrace2_data_string(\"scalar\", the_repository, config->key, \"created\");\n-\t\tres = repo_config_set_gently(the_repository, config->key, config->value);\n+\t\tres = repo_config_set_in_file_gently(the_repository, cfg_file, config->key, comment, config->value);\n+\t\tfree(cfg_file);\n \t} else {\n \t\ttrace2_data_string(\"scalar\", the_repository, config->key, \"exists\");\n \t\tres = 0;\n-- \n2.52.0\n\n"},{"id":"531450","messageId":"20251129183236.52760-3-matthewhughes934@gmail.com","threadId":"64553","inReplyTo":"20251129183236.52760-1-matthewhughes934@gmail.com","subject":"[PATCH v2 2/2] config: document `gui.GCWarning`","fromName":"Matthew Hughes","fromEmail":"matthewhughes934@gmail.com","sentAt":"2025-11-29T18:33:19Z","receivedAt":"2025-11-29T18:33:22Z","isPatch":true,"sender":{"key":"matthewhughes934@gmail.com","avatar":"https://avatars.githubusercontent.com/u/34972397?v=4"},"body":"While investigating the config options set by `scalar` I noticed this\none wasn't documented.\n\nSigned-off-by: Matthew Hughes <matthewhughes934@gmail.com>\n---\n Documentation/config/gui.adoc | 5 +++++\n 1 file changed, 5 insertions(+)\n\ndiff --git a/Documentation/config/gui.adoc b/Documentation/config/gui.adoc\nindex 171be774d2..3323ff9b7e 100644\n--- a/Documentation/config/gui.adoc\n+++ b/Documentation/config/gui.adoc\n@@ -55,3 +55,8 @@ gui.blamehistoryctx::\n \tlinkgit:gitk[1] for the selected commit, when the `Show History\n \tContext` menu item is invoked from 'git gui blame'. If this\n \tvariable is set to zero, the whole history is shown.\n+\n+gui.GCWarning:\n+\tDetermines whether linkgit:git-gui[1] should prompt for garbage\n+\tcollection when git detects a large number of loose objects in\n+\tthe repository. The default value is \"true\".\n-- \n2.52.0\n\n"},{"id":"531451","messageId":"FD92D0BF-E2C0-485E-A121-4C92BD20F7F9@gmail.com","threadId":"64553","inReplyTo":"20251129183236.52760-1-matthewhughes934@gmail.com","subject":"Re: [PATCH v2 0/2] Update documentation/discoverability around `scalar`","fromName":"Ben Knoble","fromEmail":"ben.knoble@gmail.com","sentAt":"2025-11-29T19:55:10Z","receivedAt":"2025-11-29T19:55:23Z","isPatch":true,"sender":{"key":"ben.knoble@gmail.com","avatar":"https://avatars.githubusercontent.com/u/22802209?v=4"},"body":"\n> Le 29 nov. 2025 à 13:33, Matthew Hughes <matthewhughes934@gmail.com> a écrit :\n> \n> ﻿A couple of changes following on from a discussion around the\n> discoverability of `scalar` config changes[1].\n> \n> Following that thread, I was additionally working on a patch that would\n> involve commenting each of the changes and why they're set. But that was\n> taking me longer than expected so I figured I get these smaller changes\n> up rather than waiting to complete everything.\n\nI think Stolee implemented a few similar things in GitGitGadget PR 2010\n\n"},{"id":"531454","messageId":"jcqsqytuxpqwn3yhpz7fxucbuuf635q3jfgkjzauxwhrkhl7gg@g42r5kwwoknd","threadId":"64553","inReplyTo":"FD92D0BF-E2C0-485E-A121-4C92BD20F7F9@gmail.com","subject":"Re: [PATCH v2 0/2] Update documentation/discoverability around `scalar`","fromName":"Matthew Hughes","fromEmail":"matthewhughes934@gmail.com","sentAt":"2025-11-29T23:05:08Z","receivedAt":"2025-11-29T23:05:13Z","isPatch":true,"sender":{"key":"matthewhughes934@gmail.com","avatar":"https://avatars.githubusercontent.com/u/34972397?v=4"},"body":"On Sat, Nov 29, 2025 at 02:55:10PM -0500, Ben Knoble wrote:\n> I think Stolee implemented a few similar things in GitGitGadget PR 2010\n\nAh, indeed it looks like it with https://github.com/gitgitgadget/git/pull/2010,\nthat also covers the first patch of this patchset. So In that case I might just\nredraw this patchset and submit the second commit on its own as a documentation\nimprovement, thanks!\n"},{"id":"531455","messageId":"xmqqqztgcu67.fsf@gitster.g","threadId":"64553","inReplyTo":"FD92D0BF-E2C0-485E-A121-4C92BD20F7F9@gmail.com","subject":"Re: [PATCH v2 0/2] Update documentation/discoverability around `scalar`","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-11-29T23:09:52Z","receivedAt":"2025-11-29T23:09:55Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ben Knoble <ben.knoble@gmail.com> writes:\n\n>> Le 29 nov. 2025 à 13:33, Matthew Hughes <matthewhughes934@gmail.com> a écrit :\n>> \n>> ﻿A couple of changes following on from a discussion around the\n>> discoverability of `scalar` config changes[1].\n>> \n>> Following that thread, I was additionally working on a patch that would\n>> involve commenting each of the changes and why they're set. But that was\n>> taking me longer than expected so I figured I get these smaller changes\n>> up rather than waiting to complete everything.\n>\n> I think Stolee implemented a few similar things in GitGitGadget PR 2010\n\nAlso known as\n\n    https://lore.kernel.org/git/pull.2010.git.1764195516.gitgitgadget@gmail.com/\n\nqueued on 'ds/doc-scalar-config' topic that ends at c483f0a5\n(scalar: document config settings, 2025-11-26).\n"},{"id":"531474","messageId":"7AB80AA4-D3B6-46F9-B02C-7A60A9A1C5EC@gmail.com","threadId":"64553","inReplyTo":"xmqqqztgcu67.fsf@gitster.g","subject":"Re: [PATCH v2 0/2] Update documentation/discoverability around `scalar`","fromName":"Ben Knoble","fromEmail":"ben.knoble@gmail.com","sentAt":"2025-11-30T18:39:49Z","receivedAt":"2025-11-30T18:40:01Z","isPatch":true,"sender":{"key":"ben.knoble@gmail.com","avatar":"https://avatars.githubusercontent.com/u/22802209?v=4"},"body":"\n> Le 29 nov. 2025 à 18:09, Junio C Hamano <gitster@pobox.com> a écrit :\n> \n> ﻿Ben Knoble <ben.knoble@gmail.com> writes:\n> \n>>>> Le 29 nov. 2025 à 13:33, Matthew Hughes <matthewhughes934@gmail.com> a écrit :\n>>> \n>>> ﻿A couple of changes following on from a discussion around the\n>>> discoverability of `scalar` config changes[1].\n>>> \n>>> Following that thread, I was additionally working on a patch that would\n>>> involve commenting each of the changes and why they're set. But that was\n>>> taking me longer than expected so I figured I get these smaller changes\n>>> up rather than waiting to complete everything.\n>> \n>> I think Stolee implemented a few similar things in GitGitGadget PR 2010\n> \n> Also known as\n> \n>    https://lore.kernel.org/git/pull.2010.git.1764195516.gitgitgadget@gmail.com/\n> \n> queued on 'ds/doc-scalar-config' topic that ends at c483f0a5\n> (scalar: document config settings, 2025-11-26).\n\nThanks. If I paste URLs into my phone’s email client, the message I’m composing is no longer plain text. Ditto if I paste the message id from lore. And this was a long one to type by hand, so 😅"},{"id":"531475","messageId":"06bebb27-c9df-41da-997d-14299fd2ffe9@gmail.com","threadId":"64553","inReplyTo":"jcqsqytuxpqwn3yhpz7fxucbuuf635q3jfgkjzauxwhrkhl7gg@g42r5kwwoknd","subject":"Re: [PATCH v2 0/2] Update documentation/discoverability around `scalar`","fromName":"Derrick Stolee","fromEmail":"stolee@gmail.com","sentAt":"2025-11-30T19:54:08Z","receivedAt":"2025-11-30T19:54:11Z","isPatch":true,"sender":{"key":"stolee@gmail.com","avatar":"https://avatars.githubusercontent.com/u/570044?v=4"},"body":"On 11/29/2025 6:05 PM, Matthew Hughes wrote:\n> On Sat, Nov 29, 2025 at 02:55:10PM -0500, Ben Knoble wrote:\n>> I think Stolee implemented a few similar things in GitGitGadget PR 2010\n> \n> Ah, indeed it looks like it with https://github.com/gitgitgadget/git/pull/2010,\n> that also covers the first patch of this patchset. So In that case I might just\n> redraw this patchset and submit the second commit on its own as a documentation\n> improvement, thanks!\n \nI see that you also used the US Thanksgiving holidays as an opportunity to catch\nup on this thread. Thanks for the initiative! I'd love your feedback on [1].\n\nThanks,\n-Stolee\n\n[1] https://lore.kernel.org/git/pull.2010.git.1764195516.gitgitgadget@gmail.com\n"}]}