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
This commit is contained in:
Karsten Dambekalns 2016-09-09 15:46:51 +02:00
parent da623618f5
commit 7b9ea56ae9
No known key found for this signature in database
GPG key ID: FC8E7619192CBDE2

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)
}