aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-10-16 11:20:03 +0200
committerDanilo M. <danix@danix.xyz>2026-10-16 11:20:03 +0200
commit02f7797aaf6ab9e5c4a2a89ab0efb33b43349e90 (patch)
tree5a841156d6556fa53ea2f9f6c28934bcc288d550
parent2bde0952fd03d09d5ef8b1c2dcf39aa77e8762b8 (diff)
downloadquickshell-02f7797aaf6ab9e5c4a2a89ab0efb33b43349e90.tar.gz
quickshell-02f7797aaf6ab9e5c4a2a89ab0efb33b43349e90.zip
docs(git): the git config page, and replace-all appending on no match
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
-rw-r--r--AGENTS.md5
-rw-r--r--desktop/README.md1
-rw-r--r--desktop/modules/git/README.md22
-rw-r--r--desktop/modules/user/README.md3
-rw-r--r--docs/superpowers/specs/2026-10-16-git-config-design.md4
5 files changed, 33 insertions, 2 deletions
diff --git a/AGENTS.md b/AGENTS.md
index 0e13911..c70c98d 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -346,6 +346,11 @@ changing that component. The ones that generalise:
accented letter reads `s "Do\303\250r"`-style, which no shell builtin
decodes. `busctl --json=short` returns real UTF-8; `userctl` pipes it
through `jq -r .data`.
+- **`git config --replace-all` with an unmatched value appends.** With
+ `--fixed-value` and an old value no longer in the file, git adds the new
+ value and exits 0, so a stale edit duplicates a key instead of failing;
+ `--unset` of a missing value exits 5 with no message. `gitcfg` checks
+ with `--get-all` first.
## Theme
diff --git a/desktop/README.md b/desktop/README.md
index d10769d..aad446c 100644
--- a/desktop/README.md
+++ b/desktop/README.md
@@ -36,6 +36,7 @@ the IPC layer rejects. The page-less grid entry is therefore the zero-argument
modules/perf/ CPU, temperatures, GPU, network, disks, ~/.cache
modules/user/ the greeting row and the user's details page
modules/clipboard/ cliphist history: search, copy, delete, clear all
+ modules/git/ the global git config, opened from the user page
Sound, mail, vm, network, bluetooth, kdeconnect and ai each carry their own README.
Appearance is a tile onto the separate appearance shell, whose README covers the
diff --git a/desktop/modules/git/README.md b/desktop/modules/git/README.md
new file mode 100644
index 0000000..57c8965
--- /dev/null
+++ b/desktop/modules/git/README.md
@@ -0,0 +1,22 @@
+# git
+
+The global git config (`~/.gitconfig`), every key, reached from the user
+page's "More git settings" button. Back returns to the user page.
+
+One row per value, grouped by section in file order, so a key set several
+times shows several rows. Enter saves a row, Escape undoes an edit, Remove
+drops that one value, and the Add row takes `section.key` and a value.
+"Edit in editor" opens the file in Sublime Text.
+
+`gitcfg` does every read and write, through `git config`, so the file keeps
+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.
+
+Checks: `./test-gitcfg.sh` (a throwaway `GIT_CONFIG_GLOBAL`) and
+`node desktop/modules/git/test_git.js`.
+
+Not here: per-repository, system and `[include]`d configs. A value holding a
+newline edits on one line; use the editor for those.
diff --git a/desktop/modules/user/README.md b/desktop/modules/user/README.md
index 692fb78..7178838 100644
--- a/desktop/modules/user/README.md
+++ b/desktop/modules/user/README.md
@@ -15,7 +15,8 @@ Location suggests places from OpenStreetMap's Nominatim as you type:
what is typed is sent to `nominatim.openstreetmap.org`, 1s after typing
stops and from three characters, per its usage policy. Up/Down, Enter and
Escape work the list. Offline, the field is plain text. The Git section
-shows the name and email git will get, read-only, and the signing key.
+shows the name and email git will get, read-only, and the signing key;
+"More git settings" opens the full global git config (`../git/`).
The greeting is picked at random on each drawer open, never the same one
twice running, from `~/.config/quickshell/greetings`: one per line, `{user}`
diff --git a/docs/superpowers/specs/2026-10-16-git-config-design.md b/docs/superpowers/specs/2026-10-16-git-config-design.md
index e9975fc..4d463d7 100644
--- a/docs/superpowers/specs/2026-10-16-git-config-design.md
+++ b/docs/superpowers/specs/2026-10-16-git-config-design.md
@@ -39,7 +39,9 @@ reimplement git's quoting.
- `add <key> <value>`: `git config --global --add <key> <value>`.
- `unset <key> <value>`: `git config --global --fixed-value --unset <key>
<value>`. Removes only that value.
- - git's stderr passes through and its exit status is the helper's.
+ - A write prints nothing on success; on failure, git's message on stdout
+ (for the page) and exit 1. `set` and `unset` first check the old value
+ is still there: `--replace-all` with no match appends and exits 0.
- `Git.js` (`.pragma library`): `parse(text)` turns the `-z` output into
`[{section, key, value}]` in file order, `section` being everything before
the last dot (`color.branch.remote` is section `color.branch`). Tested by