]> git.ipfire.org Git - thirdparty/git.git/blobdiff - git-p4.py
git-p4: fix handling of multi-word P4EDITOR
[thirdparty/git.git] / git-p4.py
index ff132b2117c5ed7529d6b1237a9f26069cb4ef8a..de06046d60f30edf615b3a6ff80c6b71b9a438ad 100755 (executable)
--- a/git-p4.py
+++ b/git-p4.py
@@ -1220,7 +1220,7 @@ class P4Submit(Command, P4UserMap):
             editor = os.environ.get("P4EDITOR")
         else:
             editor = read_pipe("git var GIT_EDITOR").strip()
-        system([editor, template_file])
+        system(["sh", "-c", ('%s "$@"' % editor), editor, template_file])
 
         # If the file was not saved, prompt to see if this patch should
         # be skipped.  But skip this verification step if configured so.