~/.extra ran five `git config --global` writes on every shell startup, to
re-assert identity and signing after bootstrap.sh copies gitconfig over
~/.gitconfig. The dark-mode-notify agent fires on wake/unlock and runs
`pkill -usr1 zsh`, so every shell re-sources .zshrc — and therefore .extra —
simultaneously. `git config` locks with O_EXCL and has no retry or timeout for
config files, so the concurrent writes raced and printed:
error: could not lock config file /Users/jonny/.gitconfig: File exists
Identity and signing now live in an untracked ~/.gitconfig.local, included
last from gitconfig so it wins over anything above. bootstrap.sh seeds it from
gitconfig.local.template only when absent, so re-runs never clobber the real
signing key. No git writes happen on shell startup at all now.
Verified: fully-resolved config is unchanged apart from the new include.path;
author and committer both resolve from config with no GIT_* env vars set;
existing commits still verify. 12 concurrent sources of .extra are silent,
where the old version produced 27 lock errors.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
95 lines
2.4 KiB
Text
95 lines
2.4 KiB
Text
[alias]
|
|
# list aliases
|
|
aliases = !git config --get-regexp 'alias.*' | colrm 1 6 | sed 's/[ ]/ = /' | sort
|
|
bdm = "!git branch --merged | grep -v '*' | xargs -n 1 git branch -d"
|
|
default-branch = "!git symbolic-ref refs/remotes/origin/HEAD | cut -d'/' -f4"
|
|
lg = log --graph --pretty=tformat:'%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%an %ar)%Creset'
|
|
lg2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all
|
|
lastchange = log -p --follow -n 1
|
|
plog = log --graph --pretty='format:%C(red)%d%C(reset) %C(yellow)%h%C(reset) %ar %C(green)%aN%C(reset) %s'
|
|
rank = shortlog -sn --no-merges
|
|
st = status -sb
|
|
tlog = log --stat --since='1 Day Ago' --graph --pretty=oneline --abbrev-commit --date=relative
|
|
|
|
[apply]
|
|
# Detect whitespace errors when applying a patch
|
|
whitespace = fix
|
|
|
|
[filter "lfs"]
|
|
# git-lfs stuff
|
|
clean = git-lfs clean %f
|
|
smudge = git-lfs smudge %f
|
|
required = true
|
|
|
|
[gpg]
|
|
# Use OpenSSH to sign commits/tags/etc
|
|
format = ssh
|
|
|
|
[gpg "ssh"]
|
|
allowedSignersFile = ~/.ssh/allowed_signers
|
|
|
|
[help]
|
|
# Automatically correct typos in commands
|
|
autoCorrect = prompt
|
|
|
|
[pull]
|
|
ff = only
|
|
|
|
[core]
|
|
pager = delta --side-by-side --width ${FZF_PREVIEW_COLUMNS-$COLUMNS}
|
|
|
|
[interactive]
|
|
diffFilter = delta --color-only
|
|
|
|
[include]
|
|
path = ~/.config/delta/themes.gitconfig
|
|
|
|
[delta]
|
|
# use n and N to move between diff sections
|
|
navigate = true
|
|
side-by-side = true
|
|
hyperlinks = true
|
|
hyperlinks-file-link-format = "idea://open?file={path}&line={line}"
|
|
#features = weeping-willow
|
|
|
|
[merge]
|
|
conflictstyle = zdiff3
|
|
|
|
[diff]
|
|
algorithm = histogram
|
|
colorMoved = plain
|
|
mnemonicPrefix = true
|
|
renames = true
|
|
|
|
[tar "tar.xz"]
|
|
command = xz -c
|
|
|
|
[tar "tar.zst"]
|
|
command = zstd -T0 -c
|
|
|
|
[init]
|
|
defaultBranch = main
|
|
|
|
[column]
|
|
ui = auto
|
|
|
|
[branch]
|
|
sort = -committerdate
|
|
|
|
[tag]
|
|
sort = version:refname
|
|
|
|
[rerere]
|
|
enabled = true
|
|
autoupdate = true
|
|
|
|
[rebase]
|
|
autoSquash = true
|
|
autoStash = true
|
|
updateRefs = true
|
|
|
|
# Machine-local identity and signing config. Untracked, and included last so
|
|
# it wins over anything above. Keeps `bootstrap.sh`'s copy of this file
|
|
# non-destructive without needing to re-apply values on every shell startup.
|
|
[include]
|
|
path = ~/.gitconfig.local
|