Re: Huge push upload despite only having a tiny change
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 3, 2020, 20:39 UTC
- Message-ID
- <xmqqpnafriin.fsf@gitster.c.googlers.com>
- In-Reply-To
- <20200603015314.GA253041@google.com>
Jonathan Nieder <jrnieder@gmail.com> writes:
Show 9 quoted lines
> 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?