git p4: Ignore P4EDITOR if it is empty
[gitweb.git] / git-p4.py
index 0009d733f6376e208b5e31ecd53f41f542626aa6..6ce88ffb5126bc72b9947559077908a96507b2d5 100755 (executable)
--- a/git-p4.py
+++ b/git-p4.py
@@ -994,7 +994,7 @@ def edit_template(self, template_file):
         mtime = os.stat(template_file).st_mtime
 
         # invoke the editor
-        if os.environ.has_key("P4EDITOR"):
+        if os.environ.has_key("P4EDITOR") and (os.environ.get("P4EDITOR") != ""):
             editor = os.environ.get("P4EDITOR")
         else:
             editor = read_pipe("git var GIT_EDITOR").strip()