Skip to content

Commit c89ddae

Browse files
committed
fix grep search
1 parent 7866959 commit c89ddae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

routers/web/repo/search.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ func Search(ctx *context.Context) {
7070
res, err := git.GrepSearch(ctx, ctx.Repo.GitRepo, prepareSearch.Keyword, git.GrepOptions{
7171
ContextLineNumber: 1,
7272
IsFuzzy: prepareSearch.IsFuzzy,
73-
RefName: git.RefNameFromBranch(ctx.Repo.BranchName).String(), // BranchName should be default branch or the first existing branch
73+
RefName: git.RefNameFromBranch(ctx.Repo.Repository.DefaultBranch).String(), // BranchName should be default branch or the first existing branch
7474
PathspecList: indexSettingToGitGrepPathspecList(),
7575
})
7676
if err != nil {

0 commit comments

Comments
 (0)