mirror of
https://github.com/frej/fast-export.git
synced 2025-11-02 09:15:48 +01:00
Consistently terminate commit messages with LF
When the length logic for fast-import 'data' commands was updated in4c10270(Fix data handling, 2023-03-02), one branch was missed, so commit messages now do not have a final LF appended in most cases. This changed the longtime behavior, which had been consistent since the first commit of hg2git,9832035(Initial import, 2007-03-06), and is expected by some applications which compare against old conversions from Mercurial.
This commit is contained in:
@@ -281,7 +281,7 @@ def export_commit(ui,repo,revision,old_marks,max,count,authors,
|
||||
parents = commit_data['parents']
|
||||
author = commit_data['author']
|
||||
user = commit_data['committer']
|
||||
desc = commit_data['desc'] + b'\n'
|
||||
desc = commit_data['desc']
|
||||
|
||||
if len(parents)==0 and revision != 0:
|
||||
wr(b'reset refs/heads/%s' % branch)
|
||||
@@ -291,7 +291,7 @@ def export_commit(ui,repo,revision,old_marks,max,count,authors,
|
||||
if sob:
|
||||
wr(b'author %s %d %s' % (author,time,timezone))
|
||||
wr(b'committer %s %d %s' % (user,time,timezone))
|
||||
wr_data(desc)
|
||||
wr_data(desc + b'\n')
|
||||
|
||||
man=ctx.manifest()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user