forked from NYANDEV/forgejo
f321cdced7
Backport #21352 Due to a bug in presumably an older version of Gitea, multiple of my repositories still have their HEADs pointing to a `master` branch while the default branch on the UI is listed as `main`. This adds a `gitea doctor` command that will fix all of the HEAD references for repos when they're not synchronized with the default branch in the DB. This will help with cloning to ensure that git automatically checks out the right branch, instead of a nonexistent one. Note: I'm not sure if I actually need to do more other than add a file here. Will try testing this out on my server soon. Co-authored-by: Clar Fon <15850505+clarfonthey@users.noreply.github.com> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> |
||
---|---|---|
.. | ||
authorizedkeys.go | ||
breaking.go | ||
checkOldArchives.go | ||
dbconsistency.go | ||
dbversion.go | ||
doctor.go | ||
fix16961.go | ||
fix16961_test.go | ||
heads.go | ||
mergebase.go | ||
misc.go | ||
paths.go | ||
storage.go | ||
usertype.go |