diff options
-rw-r--r-- | models/repo_indexer.go | 2 |
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 } |