From 4eac60395f4b80b49e6940624d633b5c22a048d1 Mon Sep 17 00:00:00 2001 From: Felipe Contreras Date: Mon, 22 Apr 2013 16:55:24 -0500 Subject: [PATCH] remote-hg: strip extra newline 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 Signed-off-by: Junio C Hamano --- git-remote-hg | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/git-remote-hg b/git-remote-hg index d0e552c..fda4199 100755 --- a/git-remote-hg +++ b/git-remote-hg @@ -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: