mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
@@ -295,6 +295,7 @@ func SingleRelease(ctx *context.Context) {
|
||||
}
|
||||
|
||||
ctx.Data["PageIsSingleTag"] = release.IsTag
|
||||
ctx.Data["SingleReleaseTagName"] = release.TagName
|
||||
if release.IsTag {
|
||||
ctx.Data["Title"] = release.TagName
|
||||
} else {
|
||||
|
@@ -70,7 +70,7 @@ func Search(ctx *context.Context) {
|
||||
res, err := git.GrepSearch(ctx, ctx.Repo.GitRepo, prepareSearch.Keyword, git.GrepOptions{
|
||||
ContextLineNumber: 1,
|
||||
IsFuzzy: prepareSearch.IsFuzzy,
|
||||
RefName: git.RefNameFromBranch(ctx.Repo.BranchName).String(), // BranchName should be default branch or the first existing branch
|
||||
RefName: git.RefNameFromBranch(ctx.Repo.Repository.DefaultBranch).String(), // BranchName should be default branch or the first existing branch
|
||||
PathspecList: indexSettingToGitGrepPathspecList(),
|
||||
})
|
||||
if err != nil {
|
||||
|
@@ -1592,7 +1592,7 @@ func registerRoutes(m *web.Router) {
|
||||
m.Get("/watchers", repo.Watchers)
|
||||
m.Get("/search", reqUnitCodeReader, repo.Search)
|
||||
m.Post("/action/{action}", reqSignIn, repo.Action)
|
||||
}, optSignIn, context.RepoAssignment, context.RepoRef())
|
||||
}, optSignIn, context.RepoAssignment)
|
||||
|
||||
common.AddOwnerRepoGitLFSRoutes(m, optSignInIgnoreCsrf, lfsServerEnabled) // "/{username}/{reponame}/{lfs-paths}": git-lfs support
|
||||
|
||||
|
Reference in New Issue
Block a user