From 76e9a4f701880d798d90a3e069e571052e342da8 Mon Sep 17 00:00:00 2001 From: Clar Fon <15850505+clarfonthey@users.noreply.github.com> Date: Fri, 28 Oct 2022 09:41:09 -0400 Subject: [PATCH] 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 --- modules/doctor/heads.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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