Skip to content

Commit

Permalink
DefaultBranch needs to be prefixed by BranchPrefix (#9356)
Browse files Browse the repository at this point in the history
  • Loading branch information
zeripath authored and lunny committed Dec 14, 2019
1 parent 484e3dc commit 2904abd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/indexer/code/bleve.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 2904abd

Please sign in to comment.