From 280316edd6253a6a57dd762f0a4f9d189b571ddd Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sat, 22 Feb 2014 16:34:04 -0300 Subject: Fix commit --- commit | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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." -- cgit v1.2.3