Skip to content

Commit

Permalink
git/commits: Test merge commits
Browse files Browse the repository at this point in the history
Partially reverting ca82522 (git: do not include merges in the commit
range, 2017-03-21, vbatts#16).  I've kept the unrelated --no-pager addition
from that commit.

I think merges in the commit range should be checked against whatever
criteria the caller is asking for.  If the caller does not want to
check a machine-generated commit, they shouldn't include it in the
commit range.

And we already have special-cases for merges.  For example, we skip
DCO checks for merge commits.  I'd be happier without that special
case, because human-generated merge commits can still add novel code
(and therefore should have Signed-off-by), etc.  But I don't think we
want a blanket pass for merge commits.

Signed-off-by: W. Trevor King <[email protected]>
  • Loading branch information
wking committed Mar 21, 2017
1 parent 9b7297d commit a5aad5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion git/commits.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 single commit, all ancestor commits up through the hash provided.
func Commits(commitrange string) ([]CommitEntry, error) {
cmdArgs := []string{"git", "--no-pager", "log", `--no-merges`, `--pretty=format:%H`, commitrange}
cmdArgs := []string{"git", "--no-pager", "log", `--pretty=format:%H`, commitrange}
if debug() {
logrus.Infof("[git] cmd: %q", strings.Join(cmdArgs, " "))
}
Expand Down

0 comments on commit a5aad5a

Please sign in to comment.