summaryrefslogtreecommitdiffstats
path: root/services/repository/files/commit.go
diff options
context:
space:
mode:
authorJason Song <i@wolfogre.com>2023-01-09 11:50:54 +0800
committerGitHub <noreply@github.com>2023-01-09 11:50:54 +0800
commit7adc2de46404e32ed33f999d308ed56232cdfea5 (patch)
tree2404a22b5fa8a941eb5bfd16fd717fab29d899e4 /services/repository/files/commit.go
parentb878155b8741c2769b6aa50a80609c36822451c9 (diff)
downloadgitea-7adc2de46404e32ed33f999d308ed56232cdfea5.tar.gz
gitea-7adc2de46404e32ed33f999d308ed56232cdfea5.zip
Use context parameter in models/git (#22367)
After #22362, we can feel free to use transactions without `db.DefaultContext`. And there are still lots of models using `db.DefaultContext`, I think we should refactor them carefully and one by one. Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'services/repository/files/commit.go')
-rw-r--r--services/repository/files/commit.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/repository/files/commit.go b/services/repository/files/commit.go
index 74f9eb868d..9d237f1e22 100644
--- a/services/repository/files/commit.go
+++ b/services/repository/files/commit.go
@@ -38,7 +38,7 @@ func CreateCommitStatus(ctx context.Context, repo *repo_model.Repository, creato
}
gitRepo.Close()
- if err := git_model.NewCommitStatus(git_model.NewCommitStatusOptions{
+ if err := git_model.NewCommitStatus(ctx, git_model.NewCommitStatusOptions{
Repo: repo,
Creator: creator,
SHA: sha,