mirror of
https://github.com/go-gitea/gitea
synced 2025-07-15 23:17:19 +00:00
Move get/set default branch from git package to gitrepo package to hide repopath (#29126)
This commit is contained in:
@@ -102,7 +102,7 @@ func findWikiRepoCommit(ctx *context.Context) (*git.Repository, *git.Commit, err
|
||||
commit, errCommit := wikiGitRepo.GetBranchCommit(ctx.Repo.Repository.DefaultWikiBranch)
|
||||
if git.IsErrNotExist(errCommit) {
|
||||
// if the default branch recorded in database is out of sync, then re-sync it
|
||||
gitRepoDefaultBranch, errBranch := wikiGitRepo.GetDefaultBranch()
|
||||
gitRepoDefaultBranch, errBranch := gitrepo.GetWikiDefaultBranch(ctx, ctx.Repo.Repository)
|
||||
if errBranch != nil {
|
||||
return wikiGitRepo, nil, errBranch
|
||||
}
|
||||
|
Reference in New Issue
Block a user