Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jgit-dev] Welcome to the "jgit-dev" mailing list

On Fri, Mar 12, 2021 at 9:24 AM TINGTING ZHOU <zhoutt96@xxxxxxxxx> wrote:
Hi JGit team,
     I run into some bugs when using the ReceivePack and PreReceivePack to reject some git pushes operations if the packSize exceeds the limit we set.
     The problem is even though the command is rejected, the packs is also written to the server, and these pack files will never be touched, which becomes garbage packfiles. I spend some time to look into your code, actually, the write pack operation happens before the preReceivePack. Any solution to avoid these garbage packs? Thanks.

the subject of your thread is misleading ...

Are you calling ReceivePack.setMaxPackSizeLimit ?
It throws TooLargePackException if the limit is exceeded while receiving a pack.

The next gc will delete garbage packs containing unreferenced objects.

-Matthias


Back to the top