DefaultBranch needs to be prefixed by BranchPrefix (#9356)

tokarchuk/v1.17
zeripath 5 years ago committed by Lunny Xiao
parent 484e3dc5a9
commit 2904abdc22
  1. 2
      modules/indexer/code/bleve.go

@ -158,7 +158,7 @@ type fileUpdate struct {
} }
func getDefaultBranchSha(repo *models.Repository) (string, error) { func getDefaultBranchSha(repo *models.Repository) (string, error) {
stdout, err := git.NewCommand("show-ref", "-s", repo.DefaultBranch).RunInDir(repo.RepoPath()) stdout, err := git.NewCommand("show-ref", "-s", git.BranchPrefix+repo.DefaultBranch).RunInDir(repo.RepoPath())
if err != nil { if err != nil {
return "", err return "", err
} }

Loading…
Cancel
Save