diff --git a/configs/git/.gitconfig b/configs/git/.gitconfig index e113bf8..c5d7a84 100644 --- a/configs/git/.gitconfig +++ b/configs/git/.gitconfig @@ -2,6 +2,7 @@ # NOTE: These paths are imported if they exist and ignored if they don't # This allows us to have a single config file for all our machines # and control the specifics by symlinking the relevant files per-machine + path = ~/.config/git/config-fragments/global-mailmap.gitconfig path = ~/.config/git/config-fragments/personal-info.gitconfig path = ~/.config/git/config-fragments/enable-signing.gitconfig @@ -20,6 +21,7 @@ --pretty=format:'%C(yellow)commit %h%C(auto)%d%n%C(cyan)Author:%Creset %aN %C(dim white)<%aE>%n%C(cyan)Date:%Creset %C(dim white)%ad (%ar)%n%s%n' \ --date=format:'%b %d %Y %H:%M:%S %z' branches = branch -a -l -vv + overview = log --all --pretty=format:'%C(green)commit %C(yellow)%h%C(green) by %C(reset)%C(yellow)%aN %C(dim white)(%ar) %n%C(dim white)%S%n%B%n' [filter "lfs"] clean = git-lfs clean -- %f @@ -37,6 +39,3 @@ [credential "https://gist.github.com"] helper = helper = !/usr/bin/gh auth git-credential - -[mailmap] - file = ~/.config/git/.mailmap diff --git a/configs/git/config-fragments/global-mailmap.gitconfig b/configs/git/config-fragments/global-mailmap.gitconfig new file mode 100644 index 0000000..4953fee --- /dev/null +++ b/configs/git/config-fragments/global-mailmap.gitconfig @@ -0,0 +1,4 @@ +# Feel free to overwrite this file. It is only copied once. + +[mailmap] + file = ~/.config/git/.mailmap diff --git a/install-linux.sh b/install-linux.sh index 1dd4fcc..b52025a 100644 --- a/install-linux.sh +++ b/install-linux.sh @@ -52,6 +52,11 @@ ln -sf $EWCONFIG_ROOT/configs/git/.gitconfig ~/.gitconfig ln -sf $EWCONFIG_ROOT/configs/sssh/allowed_signers ~/.ssh/allowed_signers ln -sf $EWCONFIG_ROOT/configs/git/.mailmap ~/.config/git/.mailmap +# Copy the global mailmap file once +if [ ! -f ~/.config/git/config-fragments/global-mailmap.gitconfig ]; then + cp $EWCONFIG_ROOT/configs/git/config-fragments/global-mailmap.gitconfig ~/.config/git/config-fragments/global-mailmap.gitconfig +fi + # Check if GIT is installed > 2.34 set +x if type -p git > /dev/null; then @@ -74,17 +79,17 @@ if type -p chown > /dev/null; then chown "$USER:$USER" "$HOME/.ssh/config"; fi # Configure (neo)Vim ln -sf $EWCONFIG_ROOT/configs/nvim/init.vim ~/.config/nvim/init.vim -ln -sf $EWCONFIG_ROOT/configs/nvim/pack ~/.config/nvim/pack -ln -sf $EWCONFIG_ROOT/configs/nvim/third_party ~/.config/nvim/third_party +unlink ~/.config/nvim/pack || true; ln -sf $EWCONFIG_ROOT/configs/nvim/pack ~/.config/nvim/pack +unlink ~/.config/nvim/third_party || true; ln -sf $EWCONFIG_ROOT/configs/nvim/third_party ~/.config/nvim/third_party # Nautilus right-click scripts ln -sf $EWCONFIG_ROOT/configs/nautilus/scripts/* ~/.local/share/nautilus/scripts/ # Tabset configs -ln -sf $EWCONFIG_ROOT/configs/tabset/ ~/.config/tabset +unlink ~/.config/tabset || true; ln -sf $EWCONFIG_ROOT/configs/tabset ~/.config/tabset # Rofi configs -ln -sf $EWCONFIG_ROOT/configs/rofi/ ~/.config/rofi +unlink ~/.config/rofi || true; ln -sf $EWCONFIG_ROOT/configs/rofi ~/.config/rofi # Cargo ln -sf $EWCONFIG_ROOT/configs/cargo/config.toml ~/.cargo/config.toml