# [PATCH] fix git-p4 editor invocation

1 messages from 2010-01-22 to 2010-01-22. Participants: Nicolas Pitre.
Thread: https://gitlist.dev/t/22337

## Nicolas Pitre, 2010-01-22 05:55

Subject: [PATCH] fix git-p4 editor invocation
Message-ID: <alpine.LFD.2.00.1001220052140.1726@xanadu.home>
URL: https://gitlist.dev/e/alpine.LFD.2.00.1001220052140.1726%40xanadu.home

```
The strip() is required to remove the trailing newline character,
as already done elsewhere.

Signed-off-by: Nicolas Pitre <nico@fluxnic.net>

diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
index 48059d0..d1512e0 100755
--- a/contrib/fast-import/git-p4
+++ b/contrib/fast-import/git-p4
@@ -732,7 +732,7 @@ class P4Submit(Command):
             if os.environ.has_key("P4EDITOR"):
                 editor = os.environ.get("P4EDITOR")
             else:
-                editor = read_pipe("git var GIT_EDITOR")
+                editor = read_pipe("git var GIT_EDITOR").strip()
             system(editor + " " + fileName)
 
             response = "y"

```
