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.
This commit is contained in:
parent
89b68bf5ca
commit
836faf915f
|
@ -440,6 +440,8 @@ setup_pta() {
|
||||||
|
|
||||||
echo "cd $REPO_BASE/gitolite-admin.git
|
echo "cd $REPO_BASE/gitolite-admin.git
|
||||||
PATH=\$PATH:$GIT_PATH
|
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 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
|
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
|
" | ssh -T $p_port $user@$host
|
||||||
|
|
|
@ -128,6 +128,8 @@ gl-compile-conf -q
|
||||||
cd $HOME; cd $REPO_BASE/gitolite-admin.git
|
cd $HOME; cd $REPO_BASE/gitolite-admin.git
|
||||||
GIT_WORK_TREE=$GL_ADMINDIR; export GIT_WORK_TREE
|
GIT_WORK_TREE=$GL_ADMINDIR; export GIT_WORK_TREE
|
||||||
git add conf/gitolite.conf keydir
|
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
|
git diff --cached --quiet 2>/dev/null || git commit -am start
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue