From f95ceaf04aa304cff1bf0bc76e8fed3fea5d0484 Mon Sep 17 00:00:00 2001 From: Luke Diamand Date: Tue, 24 Apr 2012 09:33:21 +0100 Subject: [PATCH] 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 Signed-off-by: Junio C Hamano --- git-p4.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-p4.py b/git-p4.py index 0009d733f..6ce88ffb5 100755 --- a/git-p4.py +++ b/git-p4.py @@ -994,7 +994,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() -- 2.26.2