Doesn't belong into create.go. It should be done (for now) inside of the actual test. So the actual test could traverse to the needed directory and run those commands and then trigger the real GC of gitea.
Maintainers requested us to move the code where it is appropriate. (Not in code.go)
Hello @truecode112 in the current state code in https://github.com/DmitryFrolovTri/gitea/commit/08c65ffb1725d9fad8421705245270f8ceb87a4e
Specifically https://github.com/go-gitea/gitea/blob/6e99cf4b89bfc04a1f6a744b669803c7e6023d0f/modules/repository/create.go#L335-L354
Doesn't belong into create.go. It should be done (for now) inside of the actual test. So the actual test could traverse to the needed directory and run those commands and then trigger the real GC of gitea. Maintainers requested us to move the code where it is appropriate. (Not in code.go)
my recommendation add this to actual test.