summaryrefslogtreecommitdiffstats
path: root/models/migrations
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2022-03-29 21:13:41 +0200
committerGitHub <noreply@github.com>2022-03-30 03:13:41 +0800
commit3e88af898a7b8e2697f7e4c3867c34b802d0b660 (patch)
treee8304867b9fd8d78ef0a3da7221d84fb29592c21 /models/migrations
parent889a8c268ca6a54ff5be19e61b29b10feb4a12e8 (diff)
downloadgitea-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.go2
-rw-r--r--models/migrations/v82.go2
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
}