Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ before_install:
- mkdir -p $GOPATH/src/github.com/vbatts && ln -sf $(pwd) $GOPATH/src/github.com/vbatts/git-validation && go get ./...

before_script:
- echo $TRAVIS_COMMIT_RANGE
- echo $TRAVIS_COMMIT
- echo $TRAVIS_BRANCH
- echo $TRAVIS_TAG
Expand Down
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
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ func main() {
var commitRange = *flCommitRange
if commitRange == "" {
if strings.ToLower(os.Getenv("TRAVIS")) == "true" && !*flNoTravis {
if os.Getenv("TRAVIS_BRANCH") != "" {
commitRange = fmt.Sprintf("%s..FETCH_HEAD", os.Getenv("TRAVIS_BRANCH"))
if os.Getenv("TRAVIS_COMMIT_RANGE") != "" {
commitRange = strings.Replace("...", "..", os.Getenv("TRAVIS_COMMIT_RANGE"), 1)
} else if os.Getenv("TRAVIS_COMMIT") != "" {
commitRange = os.Getenv("TRAVIS_COMMIT")
}
Expand Down