Skip to content

Commit

Permalink
git p4: Ignore P4EDITOR if it is empty
Browse files Browse the repository at this point in the history
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 <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Luke Diamand authored and Junio C Hamano committed Apr 24, 2012
1 parent 1e3e718 commit f95ceaf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion git-p4.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit f95ceaf

Please sign in to comment.