From: Luke Diamand Date: Tue, 24 Apr 2012 08:33:21 +0000 (+0100) Subject: git p4: Ignore P4EDITOR if it is empty X-Git-Tag: v1.7.11-rc0~26^2~5 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f95ceaf04aa304cff1bf0bc76e8fed3fea5d0484;p=git.git 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 --- 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()