diff options
author | Clar Fon <15850505+clarfonthey@users.noreply.github.com> | 2022-10-28 09:41:09 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-28 09:41:09 -0400 |
commit | 76e9a4f701880d798d90a3e069e571052e342da8 (patch) | |
tree | c779d9249eccec859804d3b2645f5ed43439f9dd /modules | |
parent | b1dd1ba48f8f3e800e923b748cece80e7ed4956c (diff) | |
download | gitea-76e9a4f701880d798d90a3e069e571052e342da8.tar.gz gitea-76e9a4f701880d798d90a3e069e571052e342da8.zip |
Use right syntax for symbolic-ref command (#21577)
Follow-up to #21352: when testing this out, I found out that the syntax
for the `symbolic-ref` command was different than originally assumed in
that PR. Never got around to submitting a PR until now.
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'modules')
-rw-r--r-- | modules/doctor/heads.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/doctor/heads.go b/modules/doctor/heads.go index 7f3b2a8a02..33efc27a22 100644 --- a/modules/doctor/heads.go +++ b/modules/doctor/heads.go @@ -49,7 +49,7 @@ func synchronizeRepoHeads(ctx context.Context, logger log.Logger, autofix bool) } // otherwise, let's try fixing HEAD - err := git.NewCommand(ctx, "symbolic-ref").AddDashesAndList("HEAD", repo.DefaultBranch).Run(runOpts) + err := git.NewCommand(ctx, "symbolic-ref").AddDashesAndList("HEAD", git.BranchPrefix+repo.DefaultBranch).Run(runOpts) if err != nil { logger.Warn("Failed to fix HEAD for %s/%s: %v", repo.OwnerName, repo.Name, err) return nil |