aboutsummaryrefslogtreecommitdiffstats
path: root/services/repository/files/commit.go
diff options
context:
space:
mode:
Diffstat (limited to 'services/repository/files/commit.go')
-rw-r--r--services/repository/files/commit.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/services/repository/files/commit.go b/services/repository/files/commit.go
index 048e41e6fd..16a15e06a7 100644
--- a/services/repository/files/commit.go
+++ b/services/repository/files/commit.go
@@ -12,6 +12,7 @@ import (
repo_model "code.gitea.io/gitea/models/repo"
user_model "code.gitea.io/gitea/models/user"
"code.gitea.io/gitea/modules/git"
+ "code.gitea.io/gitea/modules/gitrepo"
"code.gitea.io/gitea/modules/structs"
"code.gitea.io/gitea/services/automerge"
)
@@ -23,7 +24,7 @@ func CreateCommitStatus(ctx context.Context, repo *repo_model.Repository, creato
repoPath := repo.RepoPath()
// confirm that commit is exist
- gitRepo, closer, err := git.RepositoryFromContextOrOpen(ctx, repo.RepoPath())
+ gitRepo, closer, err := gitrepo.RepositoryFromContextOrOpen(ctx, repo)
if err != nil {
return fmt.Errorf("OpenRepository[%s]: %w", repoPath, err)
}