threads / patch / 22337

patchfix git-p4 editor invocation

Subject: [PATCH] fix git-p4 editor invocation

## tl;dr

One message between Jan 22, 2010 and Jan 22, 2010. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Nicolas Pitre· Jan 22, 2010, 05:55 UTC · lore

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

Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
Show changes to contrib/fast-import/git-p4 +1 −1
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"

← back to recent threads