git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Taylor Blau <me@ttaylorr.com>
Cc: git@vger.kernel.org, peff@peff.net, chriscool@tuxfamily.org
Subject: Re: [PATCH 2/4] pack-bitmap.c: make object filtering functions generic
Date: Mon, 04 May 2020 22:12:39 -0700	[thread overview]
Message-ID: <xmqqd07jc6d4.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <b43a12894e7edf7d54ce2e9679f8db7dabec23e0.1588633810.git.me@ttaylorr.com> (Taylor Blau's message of "Mon, 4 May 2020 17:12:31 -0600")

Taylor Blau <me@ttaylorr.com> writes:

> In 4f3bd5606a (pack-bitmap: implement BLOB_NONE filtering, 2020-02-14),
> filtering support for bitmaps was added for the 'LOFC_BLOB_NONE' filter.
>
> In the future, we would like to add support for filters that behave as
> if they exclude a certain type of object, for e.g., the tree depth
> filter with depth 0.
>
> To prepare for this, make some of the functions used for filtering more
> generic, such as 'find_tip_blobs' and 'filter_bitmap_blob_none' so that
> they can work over arbitrary object types.
>
> To that end, create 'find_tip_objects' and
> 'filter_bitmap_exclude_type', and redefine the aforementioned functions
> in terms of those.

OK, so instead of blobs at the tip, we find objects of requested
type at the tip, which makes sense.

Similarly, blob_none filter used to exclude blobs at the tip, but a
more generic form is to exclude objects of requested type at the
tip.

And these "more generic" variants are named quite intuitively.

Then the blob_none filter becomes a thin wrapper of the more generic
one, with hardcoded OBJ_BLOB type.

Nicely done.

  reply	other threads:[~2020-05-05  5:12 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-04 23:12 [PATCH 0/4] pack-bitmap: use bitmaps for traversals with '--filter=tree:0' Taylor Blau
2020-05-04 23:12 ` [PATCH 1/4] list-objects-filter: treat NULL filter_options as "disabled" Taylor Blau
2020-05-05  5:07   ` Junio C Hamano
2020-05-04 23:12 ` [PATCH 2/4] pack-bitmap.c: make object filtering functions generic Taylor Blau
2020-05-05  5:12   ` Junio C Hamano [this message]
2020-05-04 23:12 ` [PATCH 3/4] pack-bitmap.c: support 'tree:0' filtering Taylor Blau
2020-05-05  5:25   ` Junio C Hamano
2020-05-05 15:59     ` Taylor Blau
2020-05-05 18:20       ` Junio C Hamano
2020-05-04 23:12 ` [PATCH 4/4] pack-bitmap: pass object filter to fill-in traversal Taylor Blau
2020-05-05  5:40   ` Junio C Hamano
2020-05-05 16:00     ` Taylor Blau
  -- strict thread matches above, loose matches on Subject: below --
2020-04-22 23:13 [PATCH 0/4] pack-bitmap: use bitmaps for traversals with '--filter=tree:0' Taylor Blau
2020-04-22 23:13 ` [PATCH 2/4] pack-bitmap.c: make object filtering functions generic Taylor Blau

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=xmqqd07jc6d4.fsf@gitster.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=chriscool@tuxfamily.org \
    --cc=git@vger.kernel.org \
    --cc=me@ttaylorr.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;
as well as URLs for NNTP newsgroup(s).