git p4: Ignore P4EDITOR if it is empty
p4 itself treats an empty value for P4EDITOR as the same as having P4EDITOR unset. Do the same for "git p4". Signed-off-by: Luke Diamand <luke@diamand.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Luke Diamand committed
Apr 24, 2012 at 09:33 UTC
f95ceaf04aa304cff1bf0bc76e8fed3fea5d0484
1 file changed
+1
-1
git-p4.py
+1
-1
@@ -994,7 +994,7 @@ class P4Submit(Command, P4UserMap):
994
mtime = os.stat(template_file).st_mtime
995
996
# invoke the editor
997
- if os.environ.has_key("P4EDITOR"):
997
+ if os.environ.has_key("P4EDITOR") and (os.environ.get("P4EDITOR") != ""):
998
editor = os.environ.get("P4EDITOR")
999
else:
1000
editor = read_pipe("git var GIT_EDITOR").strip()