forgejo/services/repository
yp05327 1a250c7b2b
Fix incorrect default branch when adopt a repository (#30912)
Fix #30521

we should sync branches first, then detect default branch, or
`git_model.FindBranchNames` will always return empty list, and the
detection will be wrong.

(cherry picked from commit e94723f2de7d9bf12d870f5ce9ffb291a99ba090)

Conflicts:
	services/repository/adopt.go
	trivial conflict because
	  e80466f734 Resolve lint for unused parameter and unnecessary type arguments (#30750)
	was not cherry-picked
2024-05-12 20:03:10 +02:00
..
archiver
commitstatus
files
adopt.go
adopt_test.go
avatar.go
avatar_test.go
branch.go
cache.go
check.go
collaboration.go
collaboration_test.go
commit.go
contributors_graph.go
contributors_graph_test.go
create.go
create_test.go
delete.go
delete_test.go
fork.go
fork_test.go
generate.go
generate_test.go
hooks.go
init.go
lfs.go
lfs_test.go
main_test.go
migrate.go
push.go
repository.go
repository_test.go
review.go
review_test.go
setting.go
template.go
transfer.go
transfer_test.go