You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitea/services/repository
Christian Ullrich 2d4083f03c
Do not list active repositories as unadopted (#22034) (#22166)
Backport #22034

This fixes a bug where, when searching unadopted repositories, active
repositories will be listed as well. This is because the size of the
array of repository names to check is larger by one than the
`IterateBufferSize`.

For an `IterateBufferSize` of 50, the original code will pass 51
repository names but set the query to `LIMIT 50`. If all repositories in
the query are active (i.e. not unadopted) one of them will be omitted
from the result. Due to the `ORDER BY` clause it will be the oldest (or
least recently modified) one.

Co-authored-by: Christian Ullrich <christian.ullrich@traditionsa.lu>
2 years ago
..
archiver Replace all instances of fmt.Errorf(%v) with fmt.Errorf(%w) (#21551) 2 years ago
files Replace all instances of fmt.Errorf(%v) with fmt.Errorf(%w) (#21551) 2 years ago
adopt.go Do not list active repositories as unadopted (#22034) (#22166) 2 years ago
adopt_test.go Fix repository adoption on Windows (#21646) (#21650) 2 years ago
avatar.go Replace all instances of fmt.Errorf(%v) with fmt.Errorf(%w) (#21551) 2 years ago
avatar_test.go Refactor AssertExistsAndLoadBean to use generics (#20797) 3 years ago
branch.go Replace all instances of fmt.Errorf(%v) with fmt.Errorf(%w) (#21551) 2 years ago
cache.go Slightly simplify LastCommitCache (#20444) 3 years ago
check.go Replace all instances of fmt.Errorf(%v) with fmt.Errorf(%w) (#21551) 2 years ago
fork.go Replace all instances of fmt.Errorf(%v) with fmt.Errorf(%w) (#21551) 2 years ago
fork_test.go Move some files into models' sub packages (#20262) 3 years ago
hooks.go Replace all instances of fmt.Errorf(%v) with fmt.Errorf(%w) (#21551) 2 years ago
main_test.go Use a struct as test options (#19393) 3 years ago
push.go Replace all instances of fmt.Errorf(%v) with fmt.Errorf(%w) (#21551) 2 years ago
repository.go Replace all instances of fmt.Errorf(%v) with fmt.Errorf(%w) (#21551) 2 years ago
repository_test.go Move some repository related code into sub package (#19711) 3 years ago
review.go Move some repository related code into sub package (#19711) 3 years ago
review_test.go Refactor AssertExistsAndLoadBean to use generics (#20797) 3 years ago
template.go Remove manual rollback for failed generated repositories (#20639) 3 years ago
transfer.go Move some files into models' sub packages (#20262) 3 years ago
transfer_test.go Move some files into models' sub packages (#20262) 3 years ago