Skip to content

Commit 9db5abf

Browse files
committed
DefaultBranch needs to be prefixed by BranchPrefix (go-gitea#9356)
1 parent 1aeeaa8 commit 9db5abf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

models/repo_indexer.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ type fileUpdate struct {
177177
}
178178

179179
func getDefaultBranchSha(repo *Repository) (string, error) {
180-
stdout, err := git.NewCommand("show-ref", "-s", repo.DefaultBranch).RunInDir(repo.RepoPath())
180+
stdout, err := git.NewCommand("show-ref", "-s", git.BranchPrefix+repo.DefaultBranch).RunInDir(repo.RepoPath())
181181
if err != nil {
182182
return "", err
183183
}

0 commit comments

Comments
 (0)