From: Junio C Hamano Date: Wed, 03 Jun 2020 20:39:28 GMT Subject: Re: Huge push upload despite only having a tiny change Message-ID: In-Reply-To: <20200603015314.GA253041@google.com> Jonathan Nieder writes: > There is one trick a server can use to mitigate this: advertise some > refs that don't exist! If you advertise a ref ".have", then Git > will understand that the server has that object but it is not an > actual ref. Gerrit uses this trick in its HackPushNegotiateHook[1] > to advertise a few recent commits. > ... > Summary: (1) try fetching first (2) let's improve > HackPushNegotiateHook#advertiseRefs (3) let's improve "git push" > protocol to make this a problem of the past. In the meantime, perhaps we can teach receive-pack the same "let's advertise a few recent commits as if they exist as tips of refs" as well?