]> git.ipfire.org Git - thirdparty/git.git/commit - pack-bitmap.c
pack-bitmap.c: make object filtering functions generic
authorTaylor Blau <me@ttaylorr.com>
Mon, 4 May 2020 23:12:31 +0000 (17:12 -0600)
committerJunio C Hamano <gitster@pobox.com>
Tue, 5 May 2020 04:57:58 +0000 (21:57 -0700)
commit856e12c18a4616bbfbdfd1777577c1182b148519
tree835f6b3702e8c56e4c76a43c7e776baf68e6f2cf
parent5bf7f1eaa51b3f35161e1c9e4d8bc843330dea3c
pack-bitmap.c: make object filtering functions generic

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.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
pack-bitmap.c