]> Pileus Git - ~andy/git/commitdiff
remote-hg: strip extra newline
authorFelipe Contreras <felipe.contreras@gmail.com>
Mon, 22 Apr 2013 21:55:24 +0000 (16:55 -0500)
committerJunio C Hamano <gitster@pobox.com>
Mon, 22 Apr 2013 22:33:37 +0000 (15:33 -0700)
There's no functional change since mercurial commit operation strips
that anyway, but that's no excuse for us not to do the right thing. So
let's be explicit about it.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/remote-helpers/git-remote-hg

index d0e552c0a24ba1ef50ba5e0948f2f83bf750329c..fda4199a98f67c94cac16afcbb0cf6f1f0a56631 100755 (executable)
@@ -652,6 +652,10 @@ def parse_commit(parser):
         if parser.check('merge'):
             die('octopus merges are not supported yet')
 
+    # fast-export adds an extra newline
+    if data[-1] == '\n':
+        data = data[:-1]
+
     files = {}
 
     for line in parser: