From 2904abdc22da36a7110d0b69af0fd45cdb74ebf6 Mon Sep 17 00:00:00 2001 From: zeripath Date: Sat, 14 Dec 2019 13:29:41 +0000 Subject: [PATCH] DefaultBranch needs to be prefixed by BranchPrefix (#9356) --- modules/indexer/code/bleve.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/indexer/code/bleve.go b/modules/indexer/code/bleve.go index c2d1ed902f3..c8e1bb18790 100644 --- a/modules/indexer/code/bleve.go +++ b/modules/indexer/code/bleve.go @@ -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 }