diff options
author | 6543 <6543@obermui.de> | 2022-03-29 21:13:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-30 03:13:41 +0800 |
commit | 3e88af898a7b8e2697f7e4c3867c34b802d0b660 (patch) | |
tree | e8304867b9fd8d78ef0a3da7221d84fb29592c21 /models/migrations | |
parent | 889a8c268ca6a54ff5be19e61b29b10feb4a12e8 (diff) | |
download | gitea-3e88af898a7b8e2697f7e4c3867c34b802d0b660.tar.gz gitea-3e88af898a7b8e2697f7e4c3867c34b802d0b660.zip |
Make git.OpenRepository accept Context (#19260)
* OpenRepositoryCtx -> OpenRepository
* OpenRepository -> openRepositoryWithDefaultContext, only for internal usage
Diffstat (limited to 'models/migrations')
-rw-r--r-- | models/migrations/v156.go | 2 | ||||
-rw-r--r-- | models/migrations/v82.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/models/migrations/v156.go b/models/migrations/v156.go index 77aed3ff57..26f97fe984 100644 --- a/models/migrations/v156.go +++ b/models/migrations/v156.go @@ -109,7 +109,7 @@ func fixPublisherIDforTagReleases(x *xorm.Engine) error { return err } } - gitRepo, err = git.OpenRepositoryCtx(git.DefaultContext, repoPath(repo.OwnerName, repo.Name)) + gitRepo, err = git.OpenRepository(git.DefaultContext, repoPath(repo.OwnerName, repo.Name)) if err != nil { log.Error("Error whilst opening git repo for [%d]%s/%s. Error: %v", repo.ID, repo.OwnerName, repo.Name, err) return err diff --git a/models/migrations/v82.go b/models/migrations/v82.go index 7f9f979d95..8e07e633c9 100644 --- a/models/migrations/v82.go +++ b/models/migrations/v82.go @@ -99,7 +99,7 @@ func fixReleaseSha1OnReleaseTable(x *xorm.Engine) error { userCache[repo.OwnerID] = user } - gitRepo, err = git.OpenRepositoryCtx(git.DefaultContext, RepoPath(user.Name, repo.Name)) + gitRepo, err = git.OpenRepository(git.DefaultContext, RepoPath(user.Name, repo.Name)) if err != nil { return err } |