summaryrefslogtreecommitdiffstats
path: root/modules/convert/git_commit.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/convert/git_commit.go')
-rw-r--r--modules/convert/git_commit.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/modules/convert/git_commit.go b/modules/convert/git_commit.go
index 55cac5fd58..a5c3112f13 100644
--- a/modules/convert/git_commit.go
+++ b/modules/convert/git_commit.go
@@ -72,8 +72,7 @@ func ToPayloadCommit(repo *repo_model.Repository, c *git.Commit) *api.PayloadCom
}
// ToCommit convert a git.Commit to api.Commit
-func ToCommit(repo *repo_model.Repository, commit *git.Commit, userCache map[string]*user_model.User) (*api.Commit, error) {
-
+func ToCommit(repo *repo_model.Repository, gitRepo *git.Repository, commit *git.Commit, userCache map[string]*user_model.User) (*api.Commit, error) {
var apiAuthor, apiCommitter *api.User
// Retrieve author and committer information
@@ -134,7 +133,7 @@ func ToCommit(repo *repo_model.Repository, commit *git.Commit, userCache map[str
}
// Retrieve files affected by the commit
- fileStatus, err := git.GetCommitFileStatus(repo.RepoPath(), commit.ID.String())
+ fileStatus, err := git.GetCommitFileStatus(gitRepo.Ctx, repo.RepoPath(), commit.ID.String())
if err != nil {
return nil, err
}