Update gitconfig

This commit is contained in:
David Tomaschik
2026-02-20 15:56:04 -08:00
parent 0ebc32e30a
commit 8cac819127
4 changed files with 15 additions and 31 deletions

View File

@@ -1,7 +1,6 @@
[user] [user]
name = David Tomaschik name = David Tomaschik
email = david@systemoverlord.com useConfigOnly = true
signingKey = 0x5DEA789B
[core] [core]
excludesfile = ~/.gitignore excludesfile = ~/.gitignore
@@ -73,9 +72,6 @@
[mergetool] [mergetool]
prompt = false prompt = false
[include]
path = ~/.gitconfig.local
[pull] [pull]
rebase = false rebase = false
@@ -94,3 +90,10 @@
clean = git-lfs clean -- %f clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f smudge = git-lfs smudge -- %f
process = git-lfs filter-process process = git-lfs filter-process
[include]
path = ~/.gitconfig.d/override
path = ~/.gitconfig.d/local
[includeIf "gitdir:~/personal/"]
path = ~/.gitconfig.d/personal

View File

@@ -0,0 +1,5 @@
[user]
email = david@systemoverlord.com
[github]
user = matir

View File

@@ -0,0 +1,2 @@
[user]
email = david@systemoverlord.com

View File

@@ -126,31 +126,6 @@ install_keys() {
install_known_hosts install_known_hosts
} }
setup_git_email() {
local gc_local="${HOME}/.gitconfig.local"
local current_email=""
if [[ -f "${gc_local}" ]]; then
current_email=$(git config -f "${gc_local}" user.email || true)
fi
if [[ -n "${GIT_EMAIL:-}" ]]; then
# Use environment variable
git config -f "${gc_local}" user.email "${GIT_EMAIL}"
elif [[ -n "${current_email}" ]]; then
# Already has an email set
GIT_EMAIL="${current_email}"
else
# Prompt the user
echo -n "Enter git email (leave blank to skip): " >&2
read -r GIT_EMAIL || true
if [[ -n "${GIT_EMAIL}" ]]; then
git config -f "${gc_local}" user.email "${GIT_EMAIL}"
fi
fi
export GIT_EMAIL
}
read_saved_prefs() { read_saved_prefs() {
# Can't use basedir here as we don't have it yet # Can't use basedir here as we don't have it yet
local pref_file="$(dirname "$0")/.installed-prefs" local pref_file="$(dirname "$0")/.installed-prefs"
@@ -252,7 +227,6 @@ install_main() {
link_directory_contents "${BASEDIR}/bin" "${HOME}/bin" "" link_directory_contents "${BASEDIR}/bin" "${HOME}/bin" ""
[[ "$INSTALL_KEYS" = 1 ]] && install_keys [[ "$INSTALL_KEYS" = 1 ]] && install_keys
save_prefs save_prefs
setup_git_email
cleanup cleanup
} }