diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2024-03-08 08:30:10 +0100 |
---|---|---|
committer | Earl Warren <contact@earl-warren.org> | 2024-03-11 17:36:59 +0100 |
commit | 3d9afe8813504c2e5dc599c0379d23fadf321310 (patch) | |
tree | 9cb19fbef22375d52fd8ef816e33181eaeafa1ff /services/wiki | |
parent | Make runs-on support variable expression (#29468) (diff) | |
download | forgejo-3d9afe8813504c2e5dc599c0379d23fadf321310.tar.xz forgejo-3d9afe8813504c2e5dc599c0379d23fadf321310.zip |
Move get/set default branch from git package to gitrepo package to hide repopath (#29126)
(cherry picked from commit 25b842df261452a29570ba89ffc3a4842d73f68c)
Conflicts:
routers/web/repo/wiki.go
services/repository/branch.go
services/repository/migrate.go
services/wiki/wiki.go
also apply to Forgejo specific usage of the refactored functions
Diffstat (limited to 'services/wiki')
-rw-r--r-- | services/wiki/wiki.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/services/wiki/wiki.go b/services/wiki/wiki.go index 81e0b84ea8..01c8cf987f 100644 --- a/services/wiki/wiki.go +++ b/services/wiki/wiki.go @@ -16,6 +16,7 @@ import ( "code.gitea.io/gitea/models/unit" 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/log" repo_module "code.gitea.io/gitea/modules/repository" "code.gitea.io/gitea/modules/sync" @@ -87,7 +88,7 @@ func NormalizeWikiBranch(ctx context.Context, repo *repo_model.Repository, to st return err } - if err := gitRepo.SetDefaultBranch(to); err != nil { + if err := gitrepo.SetDefaultBranch(ctx, repo, to); err != nil { return err } |