From: Jeff King <peff@peff.net>
To: Duy Nguyen <pclouds@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>,
Git Mailing List <git@vger.kernel.org>
Subject: Re: [BUG?] fetch into shallow sends a large number of objects
Date: Fri, 11 Mar 2016 13:16:35 -0500 [thread overview]
Message-ID: <20160311181635.GA31299@sigill.intra.peff.net> (raw)
In-Reply-To: <CACsJy8BRhuSOs96fonjBJ0ok6JZJ3CwLkDPCP_9QQdROZUVh8w@mail.gmail.com>
On Fri, Mar 11, 2016 at 07:47:34AM +0700, Duy Nguyen wrote:
> Well, assume again that F and G are ref heads, and their respective
> distance to C and D are the same (like the below graph), then "fetch
> --deptch=<distance>" can mark C and D as shallow cut points because
> --depth traverses from refs until the distance is met, it does not do
> total exclusion ^C like rev-list.
>
> --- B ---- C ---- H ---- F
> / /
> --- D ---- E ---- G
Right, so I think we would only apply the "use existing cutoffs as
bounds" thing when we were not otherwise given a --depth. Because it can
definitely cause us to override the depth (and there's no need to; the
point is to avoid linking in all of history, and --depth already solves
that). So we probably do want the client to ask "I'm not giving you a
depth, but please use my existing shallows as cutoffs".
I think a more interesting case here is when we have C as a cutoff, and
somebody fetches "E" directly. They are part of the truncated history.
So we should exclude them from a fetch of "G", but if the user asked for
them directly, that probably needs to override the existing shallow
cutoff.
We probably want to compute the --boundary of "E ^C", but then omit from
that any items that are directly in want_obj. IOW, it is OK to truncate
at depth=1 due to an existing cutoff, but not at depth=0. :)
That does mean we would then fetch all of the history leading up to E,
but I think that's OK. If the user didn't specify --depth and they are
fetching from behind the shallow-cutoff point, we don't have any real
way of knowing how much they wanted (though I guess it would also be
sensible to just apply depth=1 in such a case).
-Peff
prev parent reply other threads:[~2016-03-11 18:24 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-07 22:15 [BUG?] fetch into shallow sends a large number of objects Jeff King
2016-03-07 23:47 ` Junio C Hamano
2016-03-08 0:53 ` Duy Nguyen
2016-03-08 12:21 ` Jeff King
2016-03-08 12:14 ` Jeff King
2016-03-08 12:33 ` Duy Nguyen
2016-03-08 13:25 ` Jeff King
2016-03-08 13:30 ` Jeff King
2016-03-08 23:02 ` Duy Nguyen
2016-03-10 12:20 ` Duy Nguyen
2016-03-10 21:10 ` Jeff King
2016-03-10 21:26 ` Junio C Hamano
2016-03-10 21:40 ` Jeff King
2016-03-11 0:47 ` Duy Nguyen
2016-03-11 16:53 ` Junio C Hamano
2016-03-11 18:16 ` Jeff King [this message]
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160311181635.GA31299@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=pclouds@gmail.com \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).