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: Thu, 11 Jul 2013 15:53:58 -0700 [thread overview]
Message-ID: <7vsizkpv21.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <20130711220127.GK10217@login.drsnuggles.stderr.nl> (Matthijs Kooijman's message of "Fri, 12 Jul 2013 00:01:27 +0200")
Matthijs Kooijman <matthijs@stdin.nl> writes:
[administrivia: you seem to have mail-followup-to that points at you
and the list; is that really needed???]
> This happens when a client issues a fetch with a depth bigger or equal
> to the number of commits the server is ahead of the client.
Do you mean "smaller" (not "bigger")?
> diff --git a/upload-pack.c b/upload-pack.c
> index 59f43d1..5885f33 100644
> --- a/upload-pack.c
> +++ b/upload-pack.c
> @@ -122,6 +122,14 @@ static int do_rev_list(int in, int out, void *user_data)
> if (prepare_revision_walk(&revs))
> die("revision walk setup failed");
> mark_edges_uninteresting(revs.commits, &revs, show_edge);
> + /* In case we create a new shallow root, make sure that all
> + * we don't send over objects that the client already has just
> + * because their "have" revisions are no longer reachable from
> + * the shallow root. */
> + for (i = 0; i < have_obj.nr; i++) {
> + struct commit *commit = (struct commit *)have_obj.objects[i].item;
> + mark_tree_uninteresting(commit->tree);
> + }
Hmph.
In your discussion (including the comment), you talk about "shallow
root" (I think that is the same as what we call "shallow boundary"),
but in this added block, there is nothing that checks CLIENT_SHALLOW
or SHALLOW flags to special case that.
Is it a good idea to unconditionally do this for all "have"
revisions?
Also there is another loop that iterates over "have" revisions just
above the precontext. I wonder if this added code belongs in that
loop.
next prev parent reply other threads:[~2013-07-11 22:54 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 [this message]
2013-07-12 7:11 ` Matthijs Kooijman
2013-08-07 10:27 ` Matthijs Kooijman
2013-08-08 1:01 ` Junio C Hamano
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vsizkpv21.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.
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).