mirror of
https://github.com/vbatts/git-validation.git
synced 2024-12-01 20:45:42 +00:00
Merge pull request #16 from vbatts/no-merges
git: do not include merges in the commit range
This commit is contained in:
commit
9b7297d813
1 changed files with 1 additions and 1 deletions
|
@ -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, " "))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue