From f0f48e0fff7711401c95082c461309f1dcec4c61 Mon Sep 17 00:00:00 2001 From: zeripath Date: Sun, 15 Dec 2019 11:08:19 +0000 Subject: [PATCH] DefaultBranch needs to be prefixed by BranchPrefix (#9356) (#9359) --- models/repo_indexer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/repo_indexer.go b/models/repo_indexer.go index c9540b8b443..673a0743a46 100644 --- a/models/repo_indexer.go +++ b/models/repo_indexer.go @@ -177,7 +177,7 @@ type fileUpdate struct { } func getDefaultBranchSha(repo *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 }