git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] fix git-p4 editor invocation

From
Nicolas Pitre <nico@fluxnic.net>
Date
Jan 22, 2010, 05:55 UTC
Message-ID
<alpine.LFD.2.00.1001220052140.1726@xanadu.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"
Message 1 of 1 in “fix git-p4 editor invocation”
  1. fix git-p4 editor invocationNicolas Pitre, Jan 22, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.