From e97d5dea1d2b36ee9882de8699b382cf4fef64ae Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Fri, 16 Oct 2026 11:22:41 +0200 Subject: fix(git): refuse duplicate values, show list errors, Escape on Add Review findings. With a key holding the same value twice, --fixed-value --replace-all rewrote both and merged two rows into one, and --unset failed on both; gitcfg now counts the matches and refuses anything but exactly one, pointing at the editor. A file git cannot parse made list print nothing, which the page drew as an empty config; list now prints git's error as an error= line and the page shows it. Escape in the Add fields clears the typed text before it leaves the page, as a row's edit is undone first. Co-Authored-By: Claude Opus 5.5 --- desktop/modules/git/README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'desktop/modules/git/README.md') diff --git a/desktop/modules/git/README.md b/desktop/modules/git/README.md index 57c8965..e5a4370 100644 --- a/desktop/modules/git/README.md +++ b/desktop/modules/git/README.md @@ -13,7 +13,13 @@ its comments and layout. `--fixed-value` makes a write touch one value of a multi-valued key. `set` and `unset` first check the old value is still there, because `--replace-all` with no match appends instead of failing, and the file may have changed in the editor. After every write the page reads -the list again; a failure shows git's reason under its row. +the list again; a failure shows git's reason under its row. A value held +twice by the same key is refused, since git would merge both rows into one +on edit and cannot remove just one; fix those in the editor. A file git +cannot parse shows git's error instead of an empty list. + +Every reload rebuilds the rows, so an edit typed into one row and not +saved with Enter is lost when another row is saved or removed. Checks: `./test-gitcfg.sh` (a throwaway `GIT_CONFIG_GLOBAL`) and `node desktop/modules/git/test_git.js`. -- cgit v1.2.3