Skip to content

Commit

Permalink
DefaultBranch needs to be prefixed by BranchPrefix (go-gitea#9356)
Browse files Browse the repository at this point in the history
  • Loading branch information
zeripath committed Dec 15, 2019
1 parent 1aeeaa8 commit 9db5abf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models/repo_indexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 9db5abf

Please sign in to comment.