Skip to content

Manage ~/.config/git/config via dotfiles#248

Merged
tamakiii merged 1 commit intomainfrom
add/git-config-delta-wiring
May 6, 2026
Merged

Manage ~/.config/git/config via dotfiles#248
tamakiii merged 1 commit intomainfrom
add/git-config-delta-wiring

Conversation

@tamakiii-doppelganger
Copy link
Copy Markdown
Contributor

Summary

  • Adds .config/git/config to dotfiles management. git's XDG config path (~/.config/git/config) is already symlinked into dotfiles via the existing Makefile target — this PR populates it with the previously-host-local [core], [pager], [interactive], [delta], and [push] blocks.
  • Result: the delta-based diff system (git diff / show / log -p plus standalone cat foo.diff | delta) reproduces on a fresh host after make install instead of requiring manual ~/.gitconfig edits per machine.
  • ~/.gitconfig now retains only the [user] identity (host-local). git's source ordering (XDG first, ~/.gitconfig last) lets the per-host identity sit alongside the shared base without an explicit include.path directive.

Prerequisites on consuming hosts

  • git-delta installed (e.g. brew install git-delta on macOS). Without it, the [pager]/[interactive] entries that invoke delta will fail. Per-OS conditional inclusion isn't part of this PR — to be addressed if/when arch hosts adopt this config (out of scope per tamakiii/meta#890).

Test plan

  • On this host: git log -p and git diff continue to render with delta defaults (raw ---/+++/@@ headers, red/green line backgrounds with word-level emphasis, no syntax-theme overlay).
  • On this host: git config --show-origin --get core.editor returns ~/.config/git/config (not ~/.gitconfig), confirming the dotfiles-managed file is the active source.
  • On a fresh macOS host (post-merge, future): brew install git-delta, clone dotfiles, make install, and git log -p works without further ~/.gitconfig edits beyond the [user] block.

Related to tamakiii/meta#890

Adds the previously-host-local [pager], [interactive], [delta], [core],
and [push] blocks under dotfiles management so the diff system reproduces
on a fresh checkout.

git's XDG config (.config/git/config) is read before ~/.gitconfig, so
~/.gitconfig retains only the [user] identity (host-local), and the
delta wiring lands on every host that runs `make install`.

Prerequisite for the [delta] block to take effect: `brew install git-delta`
on macOS, or the equivalent on other OSes. If delta is missing, the
[pager]/[interactive] entries that invoke it will error — to be addressed
separately if/when arch hosts need this config.

Related to tamakiii/meta#890
@tamakiii tamakiii merged commit 8b71358 into main May 6, 2026
1 check passed
@tamakiii tamakiii deleted the add/git-config-delta-wiring branch May 6, 2026 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement tamakiii/dotfiles From tamakiii/dotfiles

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants