OSDN Git Service

fix git-p4 editor invocation
authorNicolas Pitre <nico@fluxnic.net>
Fri, 22 Jan 2010 05:55:15 +0000 (00:55 -0500)
committerJunio C Hamano <gitster@pobox.com>
Fri, 22 Jan 2010 06:02:28 +0000 (22:02 -0800)
The strip() is required to remove the trailing newline character,
as already done elsewhere.

Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/fast-import/git-p4

index 48059d0..d1512e0 100755 (executable)
@@ -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"