1
0
Fork 0
mirror of https://github.com/vbatts/git-validation.git synced 2024-11-22 16:15:40 +00:00

Merge pull request #55 from swagatbora90/DCO-check-CRLF

Replace CRLF in all commit messages which currently causes DCO check …
This commit is contained in:
Vincent Batts 2022-05-04 07:43:58 -04:00 committed by GitHub
commit fd9b8fa612
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -153,7 +153,8 @@ func LogCommit(commit string) (*CommitEntry, error) {
logrus.Errorf("[git] cmd: %q", strings.Join(cmd.Args, " "))
return nil, err
}
c[v] = strings.TrimSpace(string(out))
commitMessage := strings.ReplaceAll(string(out), "\r\n", "\n")
c[v] = strings.TrimSpace(commitMessage)
}
return &c, nil