git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Matthijs Kooijman <matthijs@stdin.nl>
Cc: git@vger.kernel.org
Subject: Re: [RFC PATCH] During a shallow fetch, prevent sending over unneeded objects
Date: Wed, 07 Aug 2013 18:01:44 -0700	[thread overview]
Message-ID: <7v61vhc7wn.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: 20130807102716.GA10217@login.drsnuggles.stderr.nl

Matthijs Kooijman <matthijs@stdin.nl> writes:

>> > In your discussion (including the comment), you talk about "shallow
>> > root" (I think that is the same as what we call "shallow boundary"),
>> I think so, yes. I mean to refer to the commits referenced in
>> .git/shallow, that have their parents "hidden".
> Could you confirm that I got the terms right here (or is the shallow
> boundary the first hidden commit?)

As long as you are consistent it is fine. I _think_ boundary refers
to what is recorded in the .git/shallow file, so they are commits
that are missing from our repository, and their immediate children
are available.

> My proposal was to only apply the fix for all have revisions when the
> previous history traversal came across some shallow boundary commits. If
> this happens, then that shallow boundary commit will be a "new" one and
> it will have prevented the history traversal from finding the full list
> of relevant "have" commits. In this case, we should just use all "have"
> commits instead.
>
> Now, looking at the code, I see a few options for detecting this case:
>
>  1 Modify mark_edges_uninteresting to return a boolean (or have an
>    output argument) if any of the commits in the list of commits to find
>    (not the edges) is a shallow boundary.
>  2 Modify mark_edges_uninteresting to have a "show_shallow" argument
>    that gets called for every shallow boundary. The show_shallow
>    function passed would then simply keep a boolean if it is passed at
>    least once.
>  3 Add another loop over the commits _after_ the call to
>    mark_edges_uninteresting, that simply looks for any shallow boundary
>    commit.
>
> The last option seems sensible to me, since it prevents modifying the
> somewhat generic mark_edges_uninteresting function for this specific
> usecase. On the other hand, it does mean that the list of commits is
> looped twice, not sure what that means for performance.
>
> Before I go and implement one of these, which option seems best to you?

My gut feeling without looking at any patch is that the simplest
(i.e. 3.) would be the best among these three.

But I suspect, with any of these approaches, you would need to be
very careful futzing with the edge ones.  It may have an interesting
interactions with --thin transfer.

  reply	other threads:[~2013-08-08  1:02 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-11 22:01 [RFC PATCH] During a shallow fetch, prevent sending over unneeded objects Matthijs Kooijman
2013-07-11 22:53 ` Junio C Hamano
2013-07-12  7:11   ` Matthijs Kooijman
2013-08-07 10:27     ` Matthijs Kooijman
2013-08-08  1:01       ` Junio C Hamano [this message]
2013-08-08  1:09         ` Duy Nguyen
2013-08-08  6:39           ` Junio C Hamano
2013-08-08  4:50 ` Duy Nguyen
2013-08-08  6:51   ` Junio C Hamano
2013-08-08  7:21     ` Duy Nguyen
2013-08-08 17:10       ` Junio C Hamano
2013-08-09 13:13         ` Duy Nguyen
2013-08-12  8:02       ` Matthijs Kooijman
2013-08-16  9:51         ` Duy Nguyen
2013-08-16  9:52           ` [PATCH 1/6] Move setup_alternate_shallow and write_shallow_commits to shallow.c Nguyễn Thái Ngọc Duy
2013-08-16  9:52             ` [PATCH 2/6] shallow: only add shallow graft points to new shallow file Nguyễn Thái Ngọc Duy
2013-08-16 23:50               ` Eric Sunshine
2013-08-16  9:52             ` [PATCH 3/6] shallow: add setup_temporary_shallow() Nguyễn Thái Ngọc Duy
2013-08-16 23:52               ` Eric Sunshine
2013-08-16  9:52             ` [PATCH 4/6] upload-pack: delegate rev walking in shallow fetch to pack-objects Nguyễn Thái Ngọc Duy
2013-08-28 14:52               ` Matthijs Kooijman
2013-08-29  9:48                 ` Duy Nguyen
2013-08-16  9:52             ` [PATCH 5/6] list-objects: reduce one argument in mark_edges_uninteresting Nguyễn Thái Ngọc Duy
2013-08-16  9:52             ` [PATCH 6/6] list-objects: mark more commits as edges " Nguyễn Thái Ngọc Duy
2013-08-28 15:36           ` [RFC PATCH] During a shallow fetch, prevent sending over unneeded objects Matthijs Kooijman
2013-08-28 16:02             ` [PATCH] Add testcase for needless objects during a shallow fetch Matthijs Kooijman
2013-08-29  9:50               ` Duy Nguyen
2013-08-31  1:25                 ` Duy Nguyen
2013-10-21  7:51           ` [RFC PATCH] During a shallow fetch, prevent sending over unneeded objects Matthijs Kooijman
2013-10-26 10:49             ` Duy Nguyen

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=7v61vhc7wn.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=matthijs@stdin.nl \
    /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).