feature #22 Use raw commit message when splitting repository (kdambekalns)

This PR was merged into the master branch.

Discussion
----------

Use raw commit message when splitting repository

In case the repository to be splt contains commit messages with
leading newlines, the trimming that is applied when using
Commit.Message() can lead to changed hashes, when comparing to
the results git subsplit created.

Fixes #20

Commits
-------

7b9ea56 Use raw commit message when splitting repository
This commit is contained in:
Fabien Potencier 2016-10-03 08:39:43 -07:00
commit f33f70aae6

View file

@ -467,7 +467,7 @@ func (s *state) copyCommit(rev *git.Commit, tree *git.Tree, parents []*git.Commi
s.logger.Printf(" copy commit \"%s\" \"%s\" \"%s\"\n", rev.Id().String(), tree.Id().String(), strings.Join(parentStrs, " "))
}
message := rev.Message()
message := rev.RawMessage()
if s.config.Git == 1 {
message = s.legacyMessage(rev)
}