Skip to content

Commit 2904abd

Browse files
zeripathlunny
authored andcommitted
DefaultBranch needs to be prefixed by BranchPrefix (#9356)
1 parent 484e3dc commit 2904abd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/indexer/code/bleve.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ type fileUpdate struct {
158158
}
159159

160160
func getDefaultBranchSha(repo *models.Repository) (string, error) {
161-
stdout, err := git.NewCommand("show-ref", "-s", repo.DefaultBranch).RunInDir(repo.RepoPath())
161+
stdout, err := git.NewCommand("show-ref", "-s", git.BranchPrefix+repo.DefaultBranch).RunInDir(repo.RepoPath())
162162
if err != nil {
163163
return "", err
164164
}

0 commit comments

Comments
 (0)