pack-objects: add list-objects filtering
commit9535ce7337b9add29fab3cb0021ccaf0da8c7138
authorJeff Hostetler <jeffhost@microsoft.com>
Tue, 21 Nov 2017 20:58:52 +0000 (21 20:58 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 22 Nov 2017 05:11:57 +0000 (22 14:11 +0900)
tree2c315b2d629b046f87b099b704f45fd157eb978c
parentcaf3827e2f6a8a0315301d52b5bf46e269b3a388
pack-objects: add list-objects filtering

Teach pack-objects to use the filtering provided by the
traverse_commit_list_filtered() interface to omit unwanted
objects from the resulting packfile.

Filtering requires the use of the "--stdout" option.

Add t5317 test.

In the future, we will introduce a "partial clone" mechanism
wherein an object in a repo, obtained from a remote, may
reference a missing object that can be dynamically fetched from
that remote once needed.  This "partial clone" mechanism will
have a way, sometimes slow, of determining if a missing link
is one of the links expected to be produced by this mechanism.

This patch introduces handling of missing objects to help
debugging and development of the "partial clone" mechanism,
and once the mechanism is implemented, for a power user to
perform operations that are missing-object aware without
incurring the cost of checking if a missing link is expected.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Reviewed-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-pack-objects.txt
builtin/pack-objects.c
t/t5317-pack-objects-filter-objects.sh [new file with mode: 0755]