From 836faf915fbfc28ab5447d6f4d2ab1c7e7726eec Mon Sep 17 00:00:00 2001 From: Sitaram Chamarty Date: Wed, 4 May 2011 13:57:39 +0530 Subject: [PATCH] forcibly set user.{name,email} if needed git 1.7.4+ insists on these two being defined. So I reduce my support load by forcing them if they were not set. Much easier than explaining to people what should be obvious from the error message. --- src/gl-easy-install | 2 ++ src/gl-setup | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/gl-easy-install b/src/gl-easy-install index 2f8a128..7b6b062 100755 --- a/src/gl-easy-install +++ b/src/gl-easy-install @@ -440,6 +440,8 @@ setup_pta() { echo "cd $REPO_BASE/gitolite-admin.git PATH=\$PATH:$GIT_PATH +git config --get user.email || git config user.email \$USER@\`hostname\` +git config --get user.name || git config user.name \"\$USER on \`hostname\`\" GIT_WORK_TREE=$GL_ADMINDIR git add conf/gitolite.conf keydir GIT_WORK_TREE=$GL_ADMINDIR git diff --cached --quiet 2>/dev/null || GIT_WORK_TREE=$GL_ADMINDIR git commit -am start " | ssh -T $p_port $user@$host diff --git a/src/gl-setup b/src/gl-setup index fd8357b..be69315 100755 --- a/src/gl-setup +++ b/src/gl-setup @@ -128,6 +128,8 @@ gl-compile-conf -q cd $HOME; cd $REPO_BASE/gitolite-admin.git GIT_WORK_TREE=$GL_ADMINDIR; export GIT_WORK_TREE git add conf/gitolite.conf keydir + git config --get user.email || git config user.email $USER@`hostname` + git config --get user.name || git config user.name "$USER on `hostname`" git diff --cached --quiet 2>/dev/null || git commit -am start )