prow/git/git.go
func (r *Repo) MergeCommitsExistBetween(target, head string) (bool, error) {
	r.logger.Infof("Verifying if merge commits exist between %s and %s.", target, head)
	b, err := r.gitCommand("log", fmt.Sprintf("%s..%s", target, head), "--oneline", "--merges").CombinedOutput()
	if err != nil {
		return false, fmt.Errorf("error verifying if merge commits exist between %s and %s: %v. output: %s", target, head, err, string(b))
	}
	return len(b) != 0, nil
}
func (r *Repo) MergeCommitsExistBetween(target, head string) (bool, error) {
	r.logger.Infof("Verifying if merge commits exist between %s and %s.", target, head)
	b, err := r.gitCommand("log", fmt.Sprintf("%s..%s", target, head), "--oneline", "--merges").CombinedOutput()
	if err != nil {
		return false, fmt.Errorf("error verifying if merge commits exist between %s and %s: %v. output: %s", target, head, err, string(b))
	}
	return len(b) != 0, nil
}
func ( r * Repo ) MergeCommitsExistBetween ( target , head string ) ( bool , error ) { r . logger . Infof ( " " , target , head ) b , err := r . gitCommand ( " " , fmt . Sprintf ( " " , target , head ) , " " , " " ) . CombinedOutput ( ) if err != nil { return false , fmt . Errorf ( " " , target , head , err , string ( b ) ) } return len ( b ) != 0 , nil }
// MergeCommitsExistBetween runs 'git log <target>..<head> --merged' to verify
// if merge commits exist between "target" and "head".
MergeCommitsExistBetween runs git log <target > .. <head > -- merged to verify if merge commits exist between target and head .