]> scripts.mit.edu Git - wizard.git/commitdiff
Don't set author or committer name to empty string.
authorEdward Z. Yang <ezyang@mit.edu>
Fri, 17 Sep 2010 19:23:34 +0000 (15:23 -0400)
committerEdward Z. Yang <ezyang@mit.edu>
Fri, 17 Sep 2010 19:23:34 +0000 (15:23 -0400)
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
wizard/util.py

index 9039f6aafba64f95b4f1111ffdb8c5d41b576ff9..8f1d1ba4bff20ab9eb0ca7121febce9e4b51072f 100644 (file)
@@ -252,6 +252,8 @@ def set_operator_env():
     if op is None:
         return
     info = user.pwnam(op)
+    if not info.realname:
+        return
     os.putenv("GIT_COMMITTER_NAME", info.realname)
     os.putenv("GIT_COMMITTER_EMAIL", info.email)
 
@@ -264,6 +266,8 @@ def set_author_env():
     info = user.passwd()
     if info is None:
         return
+    if not info.realname:
+        return
     os.putenv("GIT_AUTHOR_NAME", "%s" % info.realname)
     os.putenv("GIT_AUTHOR_EMAIL", "%s" % info.email)