From: Luke Diamand Date: Tue, 24 Apr 2012 08:08:15 GMT Subject: [PATCHv3 3/5] git p4: Ignore P4EDITOR if it is empty Message-ID: <1335254897-15242-4-git-send-email-luke@diamand.org> In-Reply-To: <1335254897-15242-1-git-send-email-luke@diamand.org> 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 --- 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