1
0
Fork 0
mirror of https://github.com/vbatts/git-validation.git synced 2024-12-28 08:16:31 +00:00

git: do not include merges in the commit range

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
Vincent Batts 2017-03-21 10:13:01 -04:00
parent a23edf13d9
commit ca8252252b
Signed by: vbatts
GPG key ID: 10937E57733F1362

View file

@ -12,7 +12,7 @@ import (
// If commitrange is a git still range 12345...54321, then it will be isolated set of commits. // If commitrange is a git still range 12345...54321, then it will be isolated set of commits.
// If commitrange is a single commit, all ancestor commits up through the hash provided. // If commitrange is a single commit, all ancestor commits up through the hash provided.
func Commits(commitrange string) ([]CommitEntry, error) { func Commits(commitrange string) ([]CommitEntry, error) {
cmdArgs := []string{"git", "log", `--pretty=format:%H`, commitrange} cmdArgs := []string{"git", "--no-pager", "log", `--no-merges`, `--pretty=format:%H`, commitrange}
if debug() { if debug() {
logrus.Infof("[git] cmd: %q", strings.Join(cmdArgs, " ")) logrus.Infof("[git] cmd: %q", strings.Join(cmdArgs, " "))
} }