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>
This commit is contained in:

committed by
Junio C Hamano

parent
169a15ebd6
commit
9cf68b27d5
@ -933,6 +933,11 @@ equivalent.
|
||||
--no-filter::
|
||||
Turn off any previous `--filter=` argument.
|
||||
|
||||
--filter-provided-objects::
|
||||
Filter the list of explicitly provided objects, which would otherwise
|
||||
always be printed even if they did not match any of the filters. Only
|
||||
useful with `--filter=`.
|
||||
|
||||
--filter-print-omitted::
|
||||
Only useful with `--filter=`; prints a list of the objects omitted
|
||||
by the filter. Object IDs are prefixed with a ``~'' character.
|
||||
|
Reference in New Issue
Block a user