From: Jeff Hostetler <git@jeffhostetler.com>
To: Derrick Stolee <derrickstolee@github.com>,
Derrick Stolee via GitGitGadget <gitgitgadget@gmail.com>,
git@vger.kernel.org
Cc: stolee@gmail.com, avarab@gmail.com, gitster@pobox.com,
zhiyou.jx@alibaba-inc.com, jonathantanmy@google.com
Subject: Re: [PATCH 00/11] Partial bundles
Date: Tue, 1 Mar 2022 13:03:41 -0500 [thread overview]
Message-ID: <0b0e3c76-d0a0-71ce-913e-dcffc8bf2746@jeffhostetler.com> (raw)
In-Reply-To: <be99d6c1-7137-9661-6f2b-bc80732003b4@github.com>
On 2/28/22 12:54 PM, Derrick Stolee wrote:
> On 2/28/2022 12:00 PM, Jeff Hostetler wrote:
>> On 2/23/22 12:55 PM, Derrick Stolee via GitGitGadget wrote:
>>> While discussing bundle-URIs [1], it came to my attention that bundles have
>>> no way to specify an object filter, so bundles cannot be used with partial
>>> clones.
>>>
>>> [1]
>>> https://lore.kernel.org/git/7fab28bf-54e7-d0e9-110a-53fad6244cc9@gmail.com/
>>>
>>> This series provides a way to fix that by adding a 'filter' capability to
>>> the bundle file format and allowing one to create a partial bundle with 'git
>>> bundle create --filter=blob:none '.
>>
>> Nicely done. There's a lot of refactoring here to move the
>> filtering code into a more usable place and get rid of some
>> of the awkward limitations of my original code. Sorry that
>> you had to slog thru all of that.
>>
>>>
>>> There are a couple things that I want to point out about this implementation
>>> that could use some high-level feedback:
>>>
>>> 1. I moved the '--filter' parsing into setup_revisions() instead of adding
>>> another place to parse it. This works for 'git bundle' but it also
>>> allows it to be parsed successfully in commands such as 'git diff' which
>>> doesn't make sense. Options such as '--objects' are already being parsed
>>> there, and they don't make sense either, so I want some thoughts on
>>> this.
>>
>> This feels like something that can wait for another task.
>> Let's keep this series focused on adding partial bundles.
>
> What do you mean "can wait"? Do you recommend that I _don't_ do this
> refactor and instead implement filter parsing directly in bundles?
>
> Or, are you saying that we should not worry about these potential
> side-effects of allowing (then ignoring) certain options in other
> commands, at least until a later series?
Sorry to be confusing here. I just meant that the refactoring looks
good and we should continue with it. And for now let's not worry
about those odd non-sense combinations that may now be possible.
That at some point later we can address the non-sense combinations
with some control flags on the call to the common parser or something.
I started thinking about that while looking at the code and just thought
that it would be a bit of a mess. And that we didn't need to do any
thing about it now. Such tweaking would be better done in a later
series.
>
>>> 2. If someone uses 'git clone partial.bdl partial' where 'partial.bdl' is a
>>> filtered bundle, then the clone will fail with a message such as
>>>
>>> fatal: missing blob object '9444604d515c0b162e37e59accd54a0bac50ed2e' fatal:
>>> remote did not send all necessary objects
>>>
>>> This might be fine. We don't expect users to clone partial bundles or fetch
>>> partial bundles into an unfiltered repo and these failures are expected. It
>>> is possible that we could put in custom logic to fail faster by reading the
>>> bundle header for a filter.
>>>
>>> Generally, the idea is to open this up as a potential way to bootstrap a
>>> clone of a partial clone using a set of precomputed partial bundles.
>>
>> I think this is to be expected.
>>
>> Would it help to have Git do a no-checkout clone when cloning
>> from a partial bundle? Maybe that would give the user a chance to set
>> a real remote (and maybe set the partial clone/fetch config settings)
>> and then backfill their local clone?? (That might be functional, but
>> not very user-friendly....)
>>
>> Or should we just consider this limitation as a placeholder while we
>> wait for the Bundle URI effort?
>
> It would be interesting to have another application of partial
> bundles, such as cloning directly from a bundle, then allowing
> a remote to be configured. It provides a "build-it-yourself"
> approach to bundle URIs for partial clones.
>
> I'm not sure if such an application is required for this series,
> or if it could be delayed until after. I'm open to suggestions.
I think what you have here is nice and self-contained. That is,
supporting partial bundles is a nice stop point. Then have 1 or 2
series that consumes them.
Jeff
next prev parent reply other threads:[~2022-03-01 18:03 UTC|newest]
Thread overview: 114+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-23 17:55 [PATCH 00/11] Partial bundles Derrick Stolee via GitGitGadget
2022-02-23 17:55 ` [PATCH 01/11] index-pack: document and test the --promisor option Derrick Stolee via GitGitGadget
2022-02-23 17:55 ` [PATCH 02/11] revision: put object filter into struct rev_info Derrick Stolee via GitGitGadget
2022-03-04 22:15 ` Junio C Hamano
2022-03-07 13:59 ` Derrick Stolee
2022-03-07 16:46 ` Junio C Hamano
2022-02-23 17:55 ` [PATCH 03/11] pack-objects: use rev.filter when possible Derrick Stolee via GitGitGadget
2022-03-04 22:25 ` Junio C Hamano
2022-02-23 17:55 ` [PATCH 04/11] pack-bitmap: drop filter in prepare_bitmap_walk() Derrick Stolee via GitGitGadget
2022-03-04 22:26 ` Junio C Hamano
2022-02-23 17:55 ` [PATCH 05/11] list-objects: consolidate traverse_commit_list[_filtered] Derrick Stolee via GitGitGadget
2022-03-04 22:30 ` Junio C Hamano
2022-02-23 17:55 ` [PATCH 06/11] MyFirstObjectWalk: update recommended usage Derrick Stolee via GitGitGadget
2022-03-04 22:33 ` Junio C Hamano
2022-03-07 14:05 ` Derrick Stolee
2022-03-07 16:47 ` Junio C Hamano
2022-02-23 17:55 ` [PATCH 07/11] bundle: safely handle --objects option Derrick Stolee via GitGitGadget
2022-02-28 16:00 ` Jeff Hostetler
2022-03-04 22:58 ` Junio C Hamano
2022-03-07 14:09 ` Derrick Stolee
2022-03-04 22:57 ` Junio C Hamano
2022-03-07 15:35 ` Ævar Arnfjörð Bjarmason
2022-02-23 17:55 ` [PATCH 08/11] bundle: parse filter capability Derrick Stolee via GitGitGadget
2022-03-07 15:38 ` Ævar Arnfjörð Bjarmason
2022-03-07 16:14 ` Derrick Stolee
2022-03-07 16:22 ` Ævar Arnfjörð Bjarmason
2022-03-07 16:29 ` Derrick Stolee
2022-03-07 15:55 ` Ævar Arnfjörð Bjarmason
2022-02-23 17:55 ` [PATCH 09/11] rev-list: move --filter parsing into revision.c Derrick Stolee via GitGitGadget
2022-02-23 17:55 ` [PATCH 10/11] bundle: create filtered bundles Derrick Stolee via GitGitGadget
2022-03-04 23:35 ` Junio C Hamano
2022-03-07 14:14 ` Derrick Stolee
2022-03-07 16:49 ` Junio C Hamano
2022-03-07 15:44 ` Ævar Arnfjörð Bjarmason
2022-02-23 17:55 ` [PATCH 11/11] bundle: unbundle promisor packs Derrick Stolee via GitGitGadget
2022-03-04 23:43 ` Junio C Hamano
2022-03-07 14:48 ` Derrick Stolee
2022-03-07 16:56 ` Junio C Hamano
2022-03-07 18:57 ` Derrick Stolee
2022-03-07 19:40 ` Junio C Hamano
2022-03-07 19:49 ` Derrick Stolee
2022-03-07 19:54 ` Junio C Hamano
2022-03-07 20:20 ` Derrick Stolee
2022-03-07 21:35 ` Junio C Hamano
2022-03-07 15:47 ` Ævar Arnfjörð Bjarmason
2022-03-07 16:10 ` Derrick Stolee
2022-02-28 17:00 ` [PATCH 00/11] Partial bundles Jeff Hostetler
2022-02-28 17:54 ` Derrick Stolee
2022-03-01 18:03 ` Jeff Hostetler [this message]
2022-03-04 19:19 ` Derrick Stolee
2022-03-07 14:55 ` Ævar Arnfjörð Bjarmason
2022-03-07 14:59 ` Derrick Stolee
2022-03-07 21:50 ` [PATCH v2 00/12] " Derrick Stolee via GitGitGadget
2022-03-07 21:50 ` [PATCH v2 01/12] index-pack: document and test the --promisor option Derrick Stolee via GitGitGadget
2022-03-07 21:50 ` [PATCH v2 02/12] revision: put object filter into struct rev_info Derrick Stolee via GitGitGadget
2022-03-07 21:50 ` [PATCH v2 03/12] pack-objects: use rev.filter when possible Derrick Stolee via GitGitGadget
2022-03-07 21:50 ` [PATCH v2 04/12] pack-bitmap: drop filter in prepare_bitmap_walk() Derrick Stolee via GitGitGadget
2022-03-07 21:50 ` [PATCH v2 05/12] list-objects: consolidate traverse_commit_list[_filtered] Derrick Stolee via GitGitGadget
2022-03-07 21:50 ` [PATCH v2 06/12] MyFirstObjectWalk: update recommended usage Derrick Stolee via GitGitGadget
2022-03-07 21:50 ` [PATCH v2 07/12] bundle: safely handle --objects option Derrick Stolee via GitGitGadget
2022-03-08 9:37 ` Ævar Arnfjörð Bjarmason
2022-03-08 13:45 ` Derrick Stolee
2022-03-08 13:53 ` Ævar Arnfjörð Bjarmason
2022-03-07 21:50 ` [PATCH v2 08/12] bundle: parse filter capability Derrick Stolee via GitGitGadget
2022-03-08 9:25 ` Ævar Arnfjörð Bjarmason
2022-03-08 13:43 ` Derrick Stolee
2022-03-07 21:50 ` [PATCH v2 09/12] rev-list: move --filter parsing into revision.c Derrick Stolee via GitGitGadget
2022-03-07 21:50 ` [PATCH v2 10/12] bundle: create filtered bundles Derrick Stolee via GitGitGadget
2022-03-07 21:50 ` [PATCH v2 11/12] bundle: unbundle promisor packs Derrick Stolee via GitGitGadget
2022-03-07 21:50 ` [PATCH v2 12/12] clone: fail gracefully when cloning filtered bundle Derrick Stolee via GitGitGadget
2022-03-07 22:11 ` [PATCH v2 00/12] Partial bundles Junio C Hamano
2022-03-08 14:39 ` [PATCH v3 " Derrick Stolee via GitGitGadget
2022-03-08 14:39 ` [PATCH v3 01/12] index-pack: document and test the --promisor option Derrick Stolee via GitGitGadget
2022-03-08 14:39 ` [PATCH v3 02/12] revision: put object filter into struct rev_info Derrick Stolee via GitGitGadget
2022-03-08 14:39 ` [PATCH v3 03/12] pack-objects: use rev.filter when possible Derrick Stolee via GitGitGadget
2022-03-08 14:39 ` [PATCH v3 04/12] pack-bitmap: drop filter in prepare_bitmap_walk() Derrick Stolee via GitGitGadget
2022-03-08 14:39 ` [PATCH v3 05/12] list-objects: consolidate traverse_commit_list[_filtered] Derrick Stolee via GitGitGadget
2022-03-09 13:24 ` Ævar Arnfjörð Bjarmason
2022-03-08 14:39 ` [PATCH v3 06/12] MyFirstObjectWalk: update recommended usage Derrick Stolee via GitGitGadget
2022-03-08 14:39 ` [PATCH v3 07/12] list-objects: handle NULL function pointers Ævar Arnfjörð Bjarmason via GitGitGadget
2022-03-08 17:26 ` Junio C Hamano
2022-03-09 13:40 ` Ævar Arnfjörð Bjarmason
2022-03-09 14:16 ` Derrick Stolee
2022-03-09 18:32 ` Junio C Hamano
2022-03-08 14:39 ` [PATCH v3 08/12] bundle: parse filter capability Derrick Stolee via GitGitGadget
2022-03-08 17:29 ` Junio C Hamano
2022-03-09 14:35 ` Derrick Stolee
2022-03-09 13:30 ` Ævar Arnfjörð Bjarmason
2022-03-08 14:39 ` [PATCH v3 09/12] rev-list: move --filter parsing into revision.c Derrick Stolee via GitGitGadget
2022-03-08 14:39 ` [PATCH v3 10/12] bundle: create filtered bundles Derrick Stolee via GitGitGadget
2022-03-08 14:39 ` [PATCH v3 11/12] bundle: unbundle promisor packs Derrick Stolee via GitGitGadget
2022-03-08 14:39 ` [PATCH v3 12/12] clone: fail gracefully when cloning filtered bundle Derrick Stolee via GitGitGadget
2022-03-08 16:10 ` Derrick Stolee
2022-03-08 17:19 ` Junio C Hamano
2022-03-09 16:01 ` [PATCH v4 00/13] Partial bundles Derrick Stolee via GitGitGadget
2022-03-09 16:01 ` [PATCH v4 01/13] index-pack: document and test the --promisor option Derrick Stolee via GitGitGadget
2022-03-09 16:01 ` [PATCH v4 02/13] list-objects-filter-options: create copy helper Derrick Stolee via GitGitGadget
2022-03-09 16:01 ` [PATCH v4 03/13] revision: put object filter into struct rev_info Derrick Stolee via GitGitGadget
2022-03-09 18:48 ` Junio C Hamano
2022-03-09 16:01 ` [PATCH v4 04/13] pack-objects: use rev.filter when possible Derrick Stolee via GitGitGadget
2022-03-10 13:11 ` Ævar Arnfjörð Bjarmason
2022-03-10 13:33 ` Derrick Stolee
2022-03-10 14:24 ` Ævar Arnfjörð Bjarmason
2022-03-09 16:01 ` [PATCH v4 05/13] pack-bitmap: drop filter in prepare_bitmap_walk() Derrick Stolee via GitGitGadget
2022-03-09 16:01 ` [PATCH v4 06/13] list-objects: consolidate traverse_commit_list[_filtered] Derrick Stolee via GitGitGadget
2022-03-09 16:01 ` [PATCH v4 07/13] MyFirstObjectWalk: update recommended usage Derrick Stolee via GitGitGadget
2022-03-09 16:01 ` [PATCH v4 08/13] list-objects: handle NULL function pointers Ævar Arnfjörð Bjarmason via GitGitGadget
2022-03-09 16:01 ` [PATCH v4 09/13] bundle: parse filter capability Derrick Stolee via GitGitGadget
2022-03-09 18:41 ` Junio C Hamano
2022-03-09 18:55 ` Derrick Stolee
2022-03-09 16:01 ` [PATCH v4 10/13] rev-list: move --filter parsing into revision.c Derrick Stolee via GitGitGadget
2022-03-09 16:01 ` [PATCH v4 11/13] bundle: create filtered bundles Derrick Stolee via GitGitGadget
2022-03-09 16:01 ` [PATCH v4 12/13] bundle: unbundle promisor packs Derrick Stolee via GitGitGadget
2022-03-09 16:01 ` [PATCH v4 13/13] clone: fail gracefully when cloning filtered bundle Derrick Stolee via GitGitGadget
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=0b0e3c76-d0a0-71ce-913e-dcffc8bf2746@jeffhostetler.com \
--to=git@jeffhostetler.com \
--cc=avarab@gmail.com \
--cc=derrickstolee@github.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=gitster@pobox.com \
--cc=jonathantanmy@google.com \
--cc=stolee@gmail.com \
--cc=zhiyou.jx@alibaba-inc.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).