feat(git): deploy user-scope ~/.gitconfig from the repo template

Git never expands $VARS in its config, so gitconfig carries @USER@ and
@EMAIL@ placeholders that install.sh fills from the deployed bashrc's
USER/EMAIL exports. A differing ~/.gitconfig is kept as
~/.gitconfig.backup-<date>; an identical one is left alone. A repo's
.git/config still overrides it. excludesfile uses ~ (git expands it,
not $HOME).

The rc files now override $USER, so the installer takes the login name
from id -un for dscl and the code-server unit.
This commit is contained in:
Bastien CHANOT
2026-10-06 10:55:24 +02:00
parent 3b53213af4
commit 51521e7ca4
5 changed files with 97 additions and 7 deletions
+31
View File
@@ -0,0 +1,31 @@
# Template for the user-scope ~/.gitconfig, rendered by install.sh.
# Git never expands $VARS: @USER@ and @EMAIL@ are replaced at install
# time with the USER and EMAIL exported by the deployed bashrc.
# A repo .git/config still overrides these values for that repo.
[user]
name = @USER@
email = @EMAIL@
[push]
default = current
[color]
ui = auto
[pull]
rebase = true
[core]
editor = vim
pager = delta
excludesfile = ~/.gitignore
[advice]
detachedHead = false
[merge]
tool = vimdiff
conflictStyle = zdiff3
[pager]
branch = false
[url "git@salsa.debian.org:installer-team/"]
pushInsteadOf = https://salsa.debian.org/installer-team/
[interactive]
diffFilter = delta --color-only
[delta]
navigate = true # use n and N to move between diff sections
dark = true # or light = true, or omit for auto-detection