From: Felipe Contreras Date: Mon, 22 Apr 2013 21:55:24 +0000 (-0500) Subject: remote-hg: strip extra newline X-Git-Tag: v1.8.3-rc0~14^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=160695949a074ae252a4d458a8e135fea3245681;p=git 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 --- diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg index d0e552c0a2..fda4199a98 100755 --- a/contrib/remote-helpers/git-remote-hg +++ b/contrib/remote-helpers/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: