From 0b4b9c7162d41b45664a689c1a1d3b0e0bc283b5 Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Sun, 3 Nov 2013 11:32:32 +0100 Subject: Export Git variables, otherwise Git falls back to determining them itself. --- commit.d/50vcs-commit | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'commit.d/50vcs-commit') diff --git a/commit.d/50vcs-commit b/commit.d/50vcs-commit index 3a4c819..5987ad6 100755 --- a/commit.d/50vcs-commit +++ b/commit.d/50vcs-commit @@ -46,14 +46,14 @@ if [ "$VCS" = git ] && [ -d .git ]; then USER_HOME="$(perl -e 'print ((getpwnam(shift()))[7])' "$USER")" if [ -n "$USER_HOME" ] && [ -e "$USER_HOME/.gitconfig" ]; then if [ -z "$GIT_AUTHOR_NAME" ]; then - GIT_AUTHOR_NAME="$(git config -f "$USER_HOME/.gitconfig" user.name)" || true + export GIT_AUTHOR_NAME="$(git config -f "$USER_HOME/.gitconfig" user.name)" || true fi if [ -z "$GIT_AUTHOR_EMAIL" ]; then - GIT_AUTHOR_EMAIL="$(git config -f "$USER_HOME/.gitconfig" user.email)" || true + export GIT_AUTHOR_EMAIL="$(git config -f "$USER_HOME/.gitconfig" user.email)" || true fi fi if [ -z "$GIT_COMMITTER_EMAIL" ]; then - GIT_COMMITER_EMAIL="$(git config --global user.email)" || true + export GIT_COMMITER_EMAIL="$(git config --global user.email)" || true fi if [ -z "$GIT_AUTHOR_NAME" ]; then -- cgit v1.2.3