summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2021-01-27 12:13:13 +0100
committerTobias Klauser <tklauser@distanz.ch>2021-01-27 12:13:13 +0100
commitf5ef3b655fba159370c4794f200c468ffff6adbd (patch)
treef5d8eb693a34d11bbb75e6c103e5cbcb250771ab
parent80d81ba6b64a723d4167e29681820e7d3cc41e35 (diff)
Remove setting of $GIT_{AUTHOR,COMMITTER}_{EMAIL,NAME}
These are set depending on the gitdir in .gitconfig now which is much easier to configure and less overhead than via zsh profiles.
-rw-r--r--.zsh/zshenv/60_git15
-rw-r--r--.zsh/zshrc/90_profiles77
2 files changed, 0 insertions, 92 deletions
diff --git a/.zsh/zshenv/60_git b/.zsh/zshenv/60_git
deleted file mode 100644
index bd9a855..0000000
--- a/.zsh/zshenv/60_git
+++ /dev/null
@@ -1,15 +0,0 @@
-# zshenv/60_git
-#
-# git environment variables
-#
-# Copyright © 2010-2012 Tobias Klauser <tklauser@distanz.ch>
-# Released under the terms of the Artistic Licence 2.0
-#
-# Source repository: git://git.distanz.ch/dotfiles/zsh.git
-
-export GIT_AUTHOR_NAME="Tobias Klauser"
-export GIT_AUTHOR_EMAIL="tklauser@distanz.ch"
-export GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME"
-export GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL"
-
-# vim:ft=zsh
diff --git a/.zsh/zshrc/90_profiles b/.zsh/zshrc/90_profiles
deleted file mode 100644
index 9573eef..0000000
--- a/.zsh/zshrc/90_profiles
+++ /dev/null
@@ -1,77 +0,0 @@
-# zshrc/90_profiles
-#
-# set up directory specific variables and options
-#
-# http://michael-prokop.at/blog/2009/05/30/directory-specific-shell-configuration-with-zsh
-#
-# chpwd_profiles taken from grml zshrc
-#
-# Copyright © 2010-2017 Tobias Klauser <tklauser@distanz.ch>
-# Released under the terms of the Artistic Licence 2.0
-#
-# Source repository: git://git.distanz.ch/dotfiles/zsh.git
-
-CHPWD_PROFILE='default'
-
-zstyle ':chpwd:profiles:/home/tklauser/go/src/github.com/isovalent(|/|/*)' profile isovalent
-zstyle ':chpwd:profiles:/home/tklauser/go/src/github.com/covalentio(|/|/*)' profile isovalent
-zstyle ':chpwd:profiles:/home/tklauser/src/isovalent(|/|/*)' profile isovalent
-zstyle ':chpwd:profiles:/home/tklauser/src/cilium/cilium.io(|/|/*)' profile cilium
-zstyle ':chpwd:profiles:/home/tklauser/src/cilium/ebpf.io(|/|/*)' profile cilium
-zstyle ':chpwd:profiles:/home/tklauser/go(|/|/*)' profile distanz
-zstyle ':chpwd:profiles:/home/tklauser/src(|/|/*)' profile distanz
-
-chpwd_profile_distanz()
-{
- [[ ${profile} == ${CHPWD_PROFILE} ]] && return 1
- print "chpwd(): Switching to profile: $profile"
-
- export GIT_AUTHOR_EMAIL="tklauser@distanz.ch"
- export GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL"
-}
-
-chpwd_profile_cilium()
-{
- [[ ${profile} == ${CHPWD_PROFILE} ]] && return 1
- print "chpwd(): Switching to profile: $profile"
-
- export GIT_AUTHOR_EMAIL="tobias@cilium.io"
- export GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL"
-}
-
-chpwd_profile_isovalent()
-{
- [[ ${profile} == ${CHPWD_PROFILE} ]] && return 1
- print "chpwd(): Switching to profile: $profile"
-
- export GIT_AUTHOR_EMAIL="tobias@isovalent.com"
- export GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL"
-}
-
-function chpwd_profiles() {
- local profile context
- local -i reexecute
-
- context=":chpwd:profiles:$PWD"
- zstyle -s "$context" profile profile || profile='default'
- zstyle -T "$context" re-execute && reexecute=1 || reexecute=0
-
- if (( ${+parameters[CHPWD_PROFILE]} == 0 )); then
- typeset -g CHPWD_PROFILE
- local CHPWD_PROFILES_INIT=1
- (( ${+functions[chpwd_profiles_init]} )) && chpwd_profiles_init
- elif [[ $profile != $CHPWD_PROFILE ]]; then
- (( ${+functions[chpwd_leave_profile_$CHPWD_PROFILE]} )) \
- && chpwd_leave_profile_${CHPWD_PROFILE}
- fi
- if (( reexecute )) || [[ $profile != $CHPWD_PROFILE ]]; then
- (( ${+functions[chpwd_profile_$profile]} )) && chpwd_profile_${profile}
- fi
-
- CHPWD_PROFILE="${profile}"
- return 0
-}
-chpwd_functions=( ${chpwd_functions} chpwd_profiles )
-
-
-# vim:ft=zsh