From: Silvio Rhatto Date: Sat, 22 Feb 2014 19:34:04 +0000 (-0300) Subject: Fix commit X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=280316edd6253a6a57dd762f0a4f9d189b571ddd;p=scripts.git Fix commit --- diff --git a/commit b/commit index d55c8e6..94eba0f 100755 --- a/commit +++ b/commit @@ -88,7 +88,11 @@ function git_push { function git_user { if ! grep -q "^\[user\]" $GIT_FOLDER/.git/config; then if echo $ARGS | grep -q -- '--config'; then - grep -A 2 "^\[user\]" $HOME/.gitconfig >> $GIT_FOLDER/.git/config + if grep -q "^\[user\]" $HOME/.gitconfig; then + grep -A 2 "^\[user\]" $HOME/.gitconfig >> $GIT_FOLDER/.git/config + else + grep -A 2 "^\[user\]" $HOME/.custom/gitconfig >> $GIT_FOLDER/.git/config + fi else echo "No user configuration section found in the repository."