{"thread":{"id":"22337","subject":"[PATCH] fix git-p4 editor invocation","startedAt":"2010-01-22T05:55:15Z","lastAt":"2010-01-22T05:55:15Z","messageCount":1,"participants":["Nicolas Pitre"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"132380","messageId":"alpine.LFD.2.00.1001220052140.1726@xanadu.home","threadId":"22337","inReplyTo":null,"subject":"[PATCH] fix git-p4 editor invocation","fromName":"Nicolas Pitre","fromEmail":"nico@fluxnic.net","sentAt":"2010-01-22T05:55:15Z","receivedAt":"2010-01-22T05:55:15Z","isPatch":true,"sender":{"key":"nico@fluxnic.net","avatar":"https://avatars.githubusercontent.com/u/702790?v=4"},"body":"The strip() is required to remove the trailing newline character,\nas already done elsewhere.\n\nSigned-off-by: Nicolas Pitre <nico@fluxnic.net>\n\ndiff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4\nindex 48059d0..d1512e0 100755\n--- a/contrib/fast-import/git-p4\n+++ b/contrib/fast-import/git-p4\n@@ -732,7 +732,7 @@ class P4Submit(Command):\n             if os.environ.has_key(\"P4EDITOR\"):\n                 editor = os.environ.get(\"P4EDITOR\")\n             else:\n-                editor = read_pipe(\"git var GIT_EDITOR\")\n+                editor = read_pipe(\"git var GIT_EDITOR\").strip()\n             system(editor + \" \" + fileName)\n \n             response = \"y\"\n"}]}