diff --git a/prow/git/git.go b/prow/git/git.go index 2846191aa342..632e3e77cd94 100644 --- a/prow/git/git.go +++ b/prow/git/git.go @@ -460,6 +460,8 @@ func retryCmd(l *logrus.Entry, dir, cmd string, arg ...string) ([]byte, error) { return b, err } +// Diff runs 'git diff HEAD --name-only' and returns a list +// of file names with upcoming changes func (r *Repo) Diff(head, sha string) (changes []string, err error) { r.logger.Infof("Diff head with %s'.", sha) output, err := r.gitCommand("diff", head, sha, "--name-only").CombinedOutput()