rev-list: allow filtering of provided items
authorPatrick Steinhardt <ps@pks.im>
Mon, 19 Apr 2021 11:47:06 +0000 (13:47 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 19 Apr 2021 21:09:11 +0000 (14:09 -0700)
commit9cf68b27d50c29a0370bd61581d350b0b0a18e85
tree3bb9369d3e084be36ed78138186f7e590cba82d9
parent169a15ebd66dd23bf8c379ad33bced1578c848ef
rev-list: allow filtering of provided items

When providing an object filter, it is currently impossible to also
filter provided items. E.g. when executing `git rev-list HEAD` , the
commit this reference points to will be treated as user-provided and is
thus excluded from the filtering mechanism. This makes it harder than
necessary to properly use the new `--filter=object:type` filter given
that even if the user wants to only see blobs, he'll still see commits
of provided references.

Improve this by introducing a new `--filter-provided-objects` option
to the git-rev-parse(1) command. If given, then all user-provided
references will be subject to filtering.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/rev-list-options.txt
builtin/pack-objects.c
builtin/rev-list.c
pack-bitmap.c
pack-bitmap.h
reachable.c
t/t6112-rev-list-filters-objects.sh
t/t6113-rev-list-bitmap-filters.sh