From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Nguyen Thai Ngoc Duy" <pclouds@gmail.com>,
"Shawn Pearce" <spearce@spearce.org>,
marcnarc@xiplink.com, "Ævar Arnfjörð" <avarab@gmail.com>,
"Angelo Borsotti" <angelo.borsotti@gmail.com>,
git <git@vger.kernel.org>
Subject: Re: push race
Date: Tue, 16 Oct 2012 13:25:02 -0400 [thread overview]
Message-ID: <20121016172502.GC27243@sigill.intra.peff.net> (raw)
In-Reply-To: <7vtxtus58h.fsf@alter.siamese.dyndns.org>
On Tue, Oct 16, 2012 at 10:21:02AM -0700, Junio C Hamano wrote:
> > I suppose we could do the way unpack-objects does: prefer present
> > objects and drop the new identical ones, no memcmp. Objects that are
> > not bases, or are ref-delta bases, can be safely dropped. ofs-delta
> > bases may lead to rewriting the pack. Do-able but not sure it's worth
> > the effort.
>
> Until you read all the incoming pack data, you won't know what
> objects are used as bases for others, so unless you are keeping
> everything in core, you would have to spool the incoming data to a
> file and then rewrite the final pack file to "drop" these "can be
> safely dropped" objects, with or without offset delta encoding.
By definition, you know that you have another copy of these objects
(that is why you are dropping them). So you could treat later delta
references to them the same as thin-pack references, and re-add your
existing on-disk copy of the object to the end of the pack.
But still...the complexity is ugly, and we do not even have a measured
problem in the real world. This is not worth thinking about. :)
-Peff
next prev parent reply other threads:[~2012-10-16 17:25 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-15 9:14 push race Angelo Borsotti
2012-10-15 11:05 ` Matthieu Moy
2012-10-15 11:53 ` Nguyen Thai Ngoc Duy
[not found] ` <CAPc5daUon3eLTDT=3wo_=rTCJWVe=ufCvmSzrjD=0T17Dxkpqw@mail.gmail.com>
2012-10-15 11:50 ` Angelo Borsotti
2012-10-15 14:09 ` Ævar Arnfjörð Bjarmason
2012-10-15 14:13 ` demerphq
2012-10-15 14:29 ` Marc Branchaud
2012-10-15 15:50 ` Angelo Borsotti
2012-10-15 18:58 ` Jeff King
2012-10-15 18:56 ` Jeff King
2012-10-16 2:09 ` Shawn Pearce
2012-10-16 4:51 ` Jeff King
2012-10-16 5:15 ` Nguyen Thai Ngoc Duy
2012-10-16 5:37 ` Jeff King
2012-10-16 10:45 ` Nguyen Thai Ngoc Duy
2012-10-16 17:02 ` Jeff King
2012-10-16 17:21 ` Junio C Hamano
2012-10-16 17:25 ` Jeff King [this message]
2012-10-16 19:09 ` Junio C Hamano
2012-10-16 6:35 ` Angelo Borsotti
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=20121016172502.GC27243@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=angelo.borsotti@gmail.com \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=marcnarc@xiplink.com \
--cc=pclouds@gmail.com \
--cc=spearce@spearce.org \
/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;
as well as URLs for NNTP newsgroup(s).