git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Jeff Hostetler <git@jeffhostetler.com>
Cc: git@vger.kernel.org, Jeff Hostetler <jeffhost@microsoft.com>,
	Jonathan Tan <jonathantanmy@google.com>,
	Matthew DeVore <matvore@google.com>
Subject: Re: how does "clone --filter=sparse:path" work?
Date: Thu, 22 Nov 2018 12:39:31 -0500	[thread overview]
Message-ID: <20181122173931.GA22123@sigill.intra.peff.net> (raw)
In-Reply-To: <79b06312-75ca-5a50-c337-dc6715305edb@jeffhostetler.com>

On Thu, Nov 08, 2018 at 01:57:52PM -0500, Jeff Hostetler wrote:

> > Should we simply be disallowing sparse:path filters over upload-pack?
> 
> The option to allow an absolute path over the wire probably needs more
> thought as you suggest.
> 
> Having it in the traverse code was useful for local testing in the
> client.
> 
> But mainly I was thinking of a use case on the client of the form:
> 
>     git rev-list
>         --objects
>         --filter=spec:path=.git/sparse-checkout
>         --missing=print
>         <commit>
> 
> and get a list of the blobs that you don't have and would need before
> you could checkout <commit> using the current sparse-checkout definition.
> You could then have a pre-checkout hook that would bulk
> fetch them before starting the actual checkout.  Since that would be
> more efficient than demand-loading blobs individually during the
> checkout.  There's more work to do in this area, but that was the idea.
> 
> But back to your point, yes, I think we should restrict this over the
> wire.

Thanks for your thorough response, and sorry for the slow reply. I had
meant to reply with a patch adding in the restriction, but I haven't
quite gotten to it. :)

It's still on my todo list, but I'm going to be offline for a bit for
vacation, and I didn't want to leave this totally hanging without a
response.

-Peff

  reply	other threads:[~2018-11-22 17:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-08  5:07 how does "clone --filter=sparse:path" work? Jeff King
2018-11-08 18:57 ` Jeff Hostetler
2018-11-22 17:39   ` Jeff King [this message]
2019-05-24  8:05     ` Christian Couder
2019-05-24  8:31       ` Jeff King
2019-05-24  9:27         ` Christian Couder

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=20181122173931.GA22123@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@jeffhostetler.com \
    --cc=git@vger.kernel.org \
    --cc=jeffhost@microsoft.com \
    --cc=jonathantanmy@google.com \
    --cc=matvore@google.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).