{"thread":{"id":"64551","subject":"[PATCH 0/2] Update documentation/discoverability around `scalar`","startedAt":"2025-11-29T17:21:58Z","lastAt":"2025-11-29T18:05:02Z","messageCount":4,"participants":["Matthew Hughes","Kristoffer Haugsbakk"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"531432","messageId":"20251129172124.4164-1-matthewhughes934@gmail.com","threadId":"64551","inReplyTo":null,"subject":"[PATCH 0/2] Update documentation/discoverability around `scalar`","fromName":"Matthew Hughes","fromEmail":"matthewhughes934@gmail.com","sentAt":"2025-11-29T17:21:55Z","receivedAt":"2025-11-29T17:21:58Z","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\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.51.0\n\n"},{"id":"531433","messageId":"20251129172124.4164-2-matthewhughes934@gmail.com","threadId":"64551","inReplyTo":"20251129172124.4164-1-matthewhughes934@gmail.com","subject":"[PATCH 1/2] scalar: add comments when setting config","fromName":"Matthew Hughes","fromEmail":"matthewhughes934@gmail.com","sentAt":"2025-11-29T17:22:18Z","receivedAt":"2025-11-29T17:22:21Z","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>\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.51.0\n\n"},{"id":"531434","messageId":"20251129172124.4164-3-matthewhughes934@gmail.com","threadId":"64551","inReplyTo":"20251129172124.4164-1-matthewhughes934@gmail.com","subject":"[PATCH 2/2] config: document `gui.GCWarning`","fromName":"Matthew Hughes","fromEmail":"matthewhughes934@gmail.com","sentAt":"2025-11-29T17:22:31Z","receivedAt":"2025-11-29T17:22:34Z","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---\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.51.0\n\n"},{"id":"531435","messageId":"dde51b05-6f75-4eb0-944a-541da9622623@app.fastmail.com","threadId":"64551","inReplyTo":"20251129172124.4164-1-matthewhughes934@gmail.com","subject":"Re: [PATCH 0/2] Update documentation/discoverability around `scalar`","fromName":"Kristoffer Haugsbakk","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2025-11-29T18:03:50Z","receivedAt":"2025-11-29T18:05:02Z","isPatch":true,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"On Sat, Nov 29, 2025, at 18:21, Matthew Hughes wrote:\n> -- \n> 2.51.0\n\nMissing signoff on both patches.\n"}]}