aboutsummaryrefslogtreecommitdiffstats
path: root/services/repository/hooks.go
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 /services/repository/hooks.go
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 'services/repository/hooks.go')
-rw-r--r--services/repository/hooks.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/services/repository/hooks.go b/services/repository/hooks.go
index 40303d5937..67931ffcb6 100644
--- a/services/repository/hooks.go
+++ b/services/repository/hooks.go
@@ -54,13 +54,13 @@ func SyncRepositoryHooks(ctx context.Context) error {
// GenerateGitHooks generates git hooks from a template repository
func GenerateGitHooks(ctx context.Context, templateRepo, generateRepo *repo_model.Repository) error {
- generateGitRepo, err := git.OpenRepositoryCtx(ctx, generateRepo.RepoPath())
+ generateGitRepo, err := git.OpenRepository(ctx, generateRepo.RepoPath())
if err != nil {
return err
}
defer generateGitRepo.Close()
- templateGitRepo, err := git.OpenRepositoryCtx(ctx, templateRepo.RepoPath())
+ templateGitRepo, err := git.OpenRepository(ctx, templateRepo.RepoPath())
if err != nil {
return err
}