Thread (7 messages) flat view 7 messages, 2 authors, 2016-06-15

[PATCHv3 3/5] git p4: Ignore P4EDITOR if it is empty

From: Luke Diamand <hidden>
Date: 2016-06-15 22:53:39
Subsystem: the rest · Maintainer: Linus Torvalds

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 <redacted>
---
 git-p4.py |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/git-p4.py b/git-p4.py
index f910d5a..ead0c44 100755
--- a/git-p4.py
+++ b/git-p4.py
@@ -970,7 +970,7 @@ class P4Submit(Command, P4UserMap):
         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()
-- 
1.7.10.381.gb484f
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help