aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2014-04-17 20:13:28 -0300
committerSilvio Rhatto <rhatto@riseup.net>2014-04-17 20:13:28 -0300
commit99f2f11436e2e84f8fafb22cc66e1bdd8047d903 (patch)
treed4931ef6f68984a8d25dfdfa817d2cf77970dfe9
parent128fa6e62e36fb6e4f7eec2b0a6b28bf6030a4b6 (diff)
downloadscripts-99f2f11436e2e84f8fafb22cc66e1bdd8047d903.tar.gz
scripts-99f2f11436e2e84f8fafb22cc66e1bdd8047d903.tar.bz2
Commit: properly check for user.email and user.name
-rwxr-xr-xcommit2
1 files changed, 1 insertions, 1 deletions
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