Skip to content

Commit f95ceaf

Browse files
luked99gitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 1e3e718 commit f95ceaf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git-p4.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -994,7 +994,7 @@ def edit_template(self, template_file):
994994
mtime = os.stat(template_file).st_mtime
995995

996996
# invoke the editor
997-
if os.environ.has_key("P4EDITOR"):
997+
if os.environ.has_key("P4EDITOR") and (os.environ.get("P4EDITOR") != ""):
998998
editor = os.environ.get("P4EDITOR")
999999
else:
10001000
editor = read_pipe("git var GIT_EDITOR").strip()

0 commit comments

Comments
 (0)