From 99f2f11436e2e84f8fafb22cc66e1bdd8047d903 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 17 Apr 2014 20:13:28 -0300 Subject: Commit: properly check for user.email and user.name --- commit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commit b/commit index 3a8e5d8..4be63d2 100755 --- a/commit +++ b/commit @@ -88,7 +88,7 @@ function git_push { # Check user information function git_user { - if ! grep -q "^\[user\]" $GIT_FOLDER/.git/config; then + if [ -z "`git config user.email`" ] && [ -z "`git config user.name`" ]; then if echo $ARGS | grep -q -- '--config'; then if grep -q "^\[user\]" $HOME/.gitconfig; then grep -A 2 "^\[user\]" $HOME/.gitconfig >> $GIT_FOLDER/.git/config -- cgit v1.2.3