aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2019-12-15 11:08:19 +0000
committerGitHub <noreply@github.com>2019-12-15 11:08:19 +0000
commitf0f48e0fff7711401c95082c461309f1dcec4c61 (patch)
treea4844fcdfa29a0da14438ecead511ba088d427d2
parent1aeeaa8e89ce41350f3c98ce9726f96a1eb7b72c (diff)
downloadgitea-f0f48e0fff7711401c95082c461309f1dcec4c61.tar.gz
gitea-f0f48e0fff7711401c95082c461309f1dcec4c61.zip
DefaultBranch needs to be prefixed by BranchPrefix (#9356) (#9359)
-rw-r--r--models/repo_indexer.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/models/repo_indexer.go b/models/repo_indexer.go
index c9540b8b44..673a0743a4 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
}