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

[PATCH] remote-hg: fix commit messages

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Apr 18, 2013, 06:06 UTC
Message-ID
<1366265191-20815-1-git-send-email-felipe.contreras@gmail.com>

git fast-import expects an extra newline after the commit message data, but we are adding it only on hg-git compat mode, which is why the bidirectionality tests pass.

We should add it unconditionally.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 contrib/remote-helpers/git-remote-hg | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg
index a5f0013..5481331 100755
--- a/contrib/remote-helpers/git-remote-hg
+++ b/contrib/remote-helpers/git-remote-hg
@@ -362,6 +362,8 @@ def export_ref(repo, name, kind, head):
         else:
             modified, removed = get_filechanges(repo, c, parents[0])
 
+        desc += '\n'
+
         if mode == 'hg':
             extra_msg = ''
 
@@ -385,7 +387,6 @@ def export_ref(repo, name, kind, head):
                 else:
                     extra_msg += "extra : %s : %s\n" % (key, urllib.quote(value))
 
-            desc += '\n'
             if extra_msg:
                 desc += '\n--HG--\n' + extra_msg
 
-- 
1.8.2.1.679.g509521a
Next: Felipe Contreras
Message 1 of 3 in “remote-hg: fix commit messages”
  1. remote-hg: fix commit messagesFelipe Contreras, Apr 18, 2013
  2. Felipe ContrerasApr 18, 2013
  3. Junio C HamanoApr 18, 2013

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.