build(deps): bump github.com/vbatts/git-validation in /test/tools

Bumps [github.com/vbatts/git-validation](https://github.com/vbatts/git-validation) from 1.1.0 to 1.2.0.
- [Release notes](https://github.com/vbatts/git-validation/releases)
- [Commits](https://github.com/vbatts/git-validation/compare/v1.1.0...v1.2.0)

---
updated-dependencies:
- dependency-name: github.com/vbatts/git-validation
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
dependabot[bot]
2023-03-15 13:00:58 +00:00
committed by GitHub
parent 68bf49799d
commit 2b4a27719c
64 changed files with 24001 additions and 294 deletions

View File

@ -15,7 +15,7 @@ import (
// If commitrange is a single commit, all ancestor commits up through the hash provided.
// If commitrange is an empty commit range, then nil is returned.
func Commits(commitrange string) ([]CommitEntry, error) {
cmdArgs := []string{"git", "--no-pager", "log", `--pretty=format:%H`, commitrange}
cmdArgs := []string{"git", "rev-list", commitrange}
if debug() {
logrus.Infof("[git] cmd: %q", strings.Join(cmdArgs, " "))
}
@ -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