mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-02 20:19:41 +00:00
refactor: remove Ctx field from git.Repository (#38500)
This commit is contained in:
@@ -41,13 +41,13 @@ func (c *commitChecker) IsCommitIDExisting(commitID string) bool {
|
||||
if c.gitRepo == nil {
|
||||
r, closer, err := gitrepo.RepositoryFromContextOrOpen(c.ctx, c.gitRepoFacade)
|
||||
if err != nil {
|
||||
log.Error("unable to open repository: %s Error: %v", gitrepo.RepoGitURL(c.gitRepoFacade), err)
|
||||
log.Error("Unable to open repository: %s Error: %v", c.gitRepoFacade.RelativePath(), err)
|
||||
return false
|
||||
}
|
||||
c.gitRepo, c.gitRepoCloser = r, closer
|
||||
}
|
||||
|
||||
exist = c.gitRepo.IsReferenceExist(commitID) // Don't use IsObjectExist since it doesn't support short hashes with gogit edition.
|
||||
exist = c.gitRepo.IsReferenceExist(c.ctx, commitID) // Don't use IsObjectExist since it doesn't support short hashes with gogit edition.
|
||||
c.commitCache[commitID] = exist
|
||||
return exist
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user