Skip to content

Commit 76e9a4f

Browse files
clarfontheylunny
andauthored
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>
1 parent b1dd1ba commit 76e9a4f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/doctor/heads.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func synchronizeRepoHeads(ctx context.Context, logger log.Logger, autofix bool)
4949
}
5050

5151
// otherwise, let's try fixing HEAD
52-
err := git.NewCommand(ctx, "symbolic-ref").AddDashesAndList("HEAD", repo.DefaultBranch).Run(runOpts)
52+
err := git.NewCommand(ctx, "symbolic-ref").AddDashesAndList("HEAD", git.BranchPrefix+repo.DefaultBranch).Run(runOpts)
5353
if err != nil {
5454
logger.Warn("Failed to fix HEAD for %s/%s: %v", repo.OwnerName, repo.Name, err)
5555
return nil

0 commit comments

Comments
 (0)