update for GitCommit API change

The GerritProject.GitCommit method in x/build/maintner returns an error
as of Start using its new API.
dmitshur committed 2 years ago commit 67e22b2f18a260a33a98c6a7d601726a58c53767
Showing partial commit. Full Commit
Collapse all
@@ -270,11 +270,15 @@ func (s service) GetDiff(_ context.Context, repo string, id uint64, opt *change.
	var c *maintner.GitCommit
	switch opt {
	case nil:
		c = cl.Commit
		c = project.GitCommit(opt.Commit)
		var err error
		c, err = project.GitCommit(opt.Commit)
		if err != nil {
			return nil, err
	var fds []*diff.FileDiff
	for _, f := range c.Files {
		fds = append(fds, &diff.FileDiff{
			OrigName: f.File,