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~79^2~2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/f95ceaf04aa304cff1bf0bc76e8fed3fea5d0484?ds=inline;hp=-c 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 --- f95ceaf04aa304cff1bf0bc76e8fed3fea5d0484 diff --git a/git-p4.py b/git-p4.py index 0009d733f6..6ce88ffb51 100755 --- a/git-p4.py +++ b/git-p4.py @@ -994,7 +994,7 @@ def edit_template(self, template_file): 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()