DefaultBranch needs to be prefixed by BranchPrefix (#9356) (#9359)

This commit is contained in:
zeripath 2019-12-15 11:08:19 +00:00 committed by GitHub
parent 1aeeaa8e89
commit f0f48e0fff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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
}