Browse Source

DefaultBranch needs to be prefixed by BranchPrefix (#9356)

tags/v1.11.0-rc1
zeripath Lunny Xiao 5 years ago
parent
commit
9e71ea2279
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      modules/indexer/code/bleve.go

+ 1
- 1
modules/indexer/code/bleve.go View File

@@ -158,7 +158,7 @@ type fileUpdate struct {
}

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 {
return "", err
}


Loading…
Cancel
Save