summaryrefslogtreecommitdiffstats
path: root/modules/indexer
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2019-12-14 13:29:41 +0000
committerLunny Xiao <xiaolunwen@gmail.com>2019-12-14 21:29:41 +0800
commit2904abdc22da36a7110d0b69af0fd45cdb74ebf6 (patch)
tree4f5e49d028a5ce3f4c98a84322114601f580454d /modules/indexer
parent484e3dc5a9012a50838bf8d00de3ffd136c0759b (diff)
downloadgitea-2904abdc22da36a7110d0b69af0fd45cdb74ebf6.tar.gz
gitea-2904abdc22da36a7110d0b69af0fd45cdb74ebf6.zip
DefaultBranch needs to be prefixed by BranchPrefix (#9356)
Diffstat (limited to 'modules/indexer')
-rw-r--r--modules/indexer/code/bleve.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/indexer/code/bleve.go b/modules/indexer/code/bleve.go
index c2d1ed902f..c8e1bb1879 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
}