Git development
 help / color / mirror / Atom feed
From: Derrick Stolee <stolee@gmail.com>
To: Taylor Blau <me@ttaylorr.com>, git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>, Jeff King <peff@peff.net>,
	Elijah Newren <newren@gmail.com>
Subject: Re: [RFC PATCH 2/7] path-walk: support `tree:0` filter
Date: Mon, 4 May 2026 08:30:23 -0400	[thread overview]
Message-ID: <bfb6d757-7b13-4267-9fd5-8739c7395378@gmail.com> (raw)
In-Reply-To: <e1b7fd3cb2a2bba5f6404ac5f8ac3487a46d51b5.1777853408.git.me@ttaylorr.com>

On 5/3/2026 8:11 PM, Taylor Blau wrote:
> The `tree:0` object filter omits all trees and blobs from the result,
> keeping only commits and tags. Consequently, this filter type should
> has a fairly straightforward integration with path-walk, as the decision
> to include an object depends only on its type and does not depend on any
> path-sensitive state.

I agree that the implementation here is straight-forward. It's something
where I could easily see wanting to disable the path-walk API because it
is no longer contributing much value, but perhaps the caller wants a
consistent callback that provides all commits and tags in different
chunks.
> Non-zero tree-depth filters are not supported. Those depend on the depth
> at which a tree is visited, which is a path-walk concept the filter
> machinery doesn't currently share with the path-walk API. Reject them in
> `prepare_filters()` with a helpful error and let pack-objects fall back
> to the regular traversal, the same way it already does for unsupported
> filters.

I think that this could be remedied with some tweaks to the internal
methods and data within the path-walk API to track a depth. This could
be handled later, if there was enough demand for nonzero tree-depth.

The diff itself looks good.

Thanks,
-Stolee


  reply	other threads:[~2026-05-04 12:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-04  0:11 [RFC PATCH 0/7] pack-bitmap: resolve various `--path-walk` incompatibilities Taylor Blau
2026-05-04  0:11 ` [RFC PATCH 1/7] pack-objects: update `--path-walk`'s existing incompatibilities Taylor Blau
2026-05-04 12:22   ` Derrick Stolee
2026-05-04  0:11 ` [RFC PATCH 2/7] path-walk: support `tree:0` filter Taylor Blau
2026-05-04 12:30   ` Derrick Stolee [this message]
2026-05-04 21:55   ` Kristoffer Haugsbakk
2026-05-04  0:11 ` [RFC PATCH 3/7] path-walk: support `object:type` filter Taylor Blau
2026-05-04 12:32   ` Derrick Stolee
2026-05-04  0:11 ` [RFC PATCH 4/7] path-walk: support `combine` filter Taylor Blau
2026-05-04  0:11 ` [RFC PATCH 5/7] pack-objects: support reachability bitmaps with `--path-walk` Taylor Blau
2026-05-04  0:11 ` [RFC PATCH 6/7] pack-objects: extract `record_tree_depth()` helper Taylor Blau
2026-05-04  0:11 ` [RFC PATCH 7/7] pack-objects: support `--delta-islands` with `--path-walk` Taylor Blau
2026-05-04 12:13 ` [RFC PATCH 0/7] pack-bitmap: resolve various `--path-walk` incompatibilities Derrick Stolee

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=bfb6d757-7b13-4267-9fd5-8739c7395378@gmail.com \
    --to=stolee@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=me@ttaylorr.com \
    --cc=newren@gmail.com \
    --cc=peff@peff.net \
    /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