From 0715817bfe7837d3a1bae98cd9b53836f68e7f56 Mon Sep 17 00:00:00 2001 From: Andrew Thornton Date: Sat, 14 Dec 2019 11:46:44 +0000 Subject: [PATCH] DefaultBranch needs to be prefixed by BranchPrefix --- 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 c2d1ed902f3f5..c8e1bb1879051 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 }