From: "Shawn O. Pearce" <spearce@spearce.org>
To: Joey Hess <joey@kitenet.net>
Cc: git@vger.kernel.org
Subject: Re: the 100 mb push
Date: Tue, 15 Dec 2009 11:42:12 -0800 [thread overview]
Message-ID: <20091215194212.GC18319@spearce.org> (raw)
In-Reply-To: <20091215192338.GA16654@gnu.kitenet.net>
Joey Hess <joey@kitenet.net> wrote:
> Is it normal for git push to sometimes transfer much more data
> than seems necessary? Here is a case where that happens:
Yes.
> Meanwhile, the testsuite branch is a 100+ mb monster, containing a lot
> of big binaries. In it, a small change has been made in the origin
> repo. In the local repo, a *lot* of *big* files have been deleted from
> the same branch, about 20 mb of files were removed all told. But the diff
> for this change should be quite small.
>
> So, testsuite needs to be merged before it can be pushed, but git push
> doesn't tell me that. Instead, it goes off and does this for 2+ hours:
The problem here is, unlike fetch, push does not do a common
ancestor negotiation. The sending side (your push client)
just assumes the remote side has *only* what the remote side
advertised.
Since the remote side advertised a commit on the testsuite branch
that your client doesn't have, your client was forced to assume
there was no common ancestor and sent the entire thing.
This usually doesn't show up that badly because the delta tends to
be smaller (no huge binary files), tends to be a strict fast forward
(so your client contains what the remote advertised), and tags may
help to limit the upload size by being at fixed points in the history
(so at worst you upload since the last tag).
Junio wrote a patch series for git push over a year ago to make
it do common ancestor negotiation like git fetch does, but it had
a deadlock problem and the patch series got dropped. Not enough
people were interested to help Junio carry it through to being
ready for inclusion.
--
Shawn.
next prev parent reply other threads:[~2009-12-15 19:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-15 19:23 the 100 mb push Joey Hess
2009-12-15 19:42 ` Shawn O. Pearce [this message]
2009-12-15 20:00 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091215194212.GC18319@spearce.org \
--to=spearce@spearce.org \
--cc=git@vger.kernel.org \
--cc=joey@kitenet.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox