Skip to content

Commit 1606959

Browse files
Felipe Contrerasgitster
authored andcommitted
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 <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 97253a2 commit 1606959

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

contrib/remote-helpers/git-remote-hg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -652,6 +652,10 @@ def parse_commit(parser):
652652
if parser.check('merge'):
653653
die('octopus merges are not supported yet')
654654

655+
# fast-export adds an extra newline
656+
if data[-1] == '\n':
657+
data = data[:-1]
658+
655659
files = {}
656660

657661
for line in parser:

0 commit comments

Comments
 (0)