Skip to content

Commit 3c71df2

Browse files
committed
Consider only commit IDs when listing range
When using `git log`, if some/all commits are gpg-signed, git will automatically try to validate the signatures by default. This results in printing additional text. This additional gpg-validation text is then incorrectly interpreted by `git-validate` as if they were commit IDs. Fix the problem by using the `rev-list` sub-command which will ONLY list the IDs. Signed-off-by: Chris Evich <[email protected]>
1 parent 91e5ebf commit 3c71df2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git/commits.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
// If commitrange is a single commit, all ancestor commits up through the hash provided.
1616
// If commitrange is an empty commit range, then nil is returned.
1717
func Commits(commitrange string) ([]CommitEntry, error) {
18-
cmdArgs := []string{"git", "--no-pager", "log", `--pretty=format:%H`, commitrange}
18+
cmdArgs := []string{"git", "rev-list", commitrange}
1919
if debug() {
2020
logrus.Infof("[git] cmd: %q", strings.Join(cmdArgs, " "))
2121
}

0 commit comments

Comments
 (0)