diff options
-rwxr-xr-x | commit | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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." |