diff options
author | Taylor Blau <me@ttaylorr.com> | 2021-02-22 21:25:07 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-02-22 23:30:52 -0800 |
commit | c9fff0001699dd2862bf350146631fe53c1226d9 (patch) | |
tree | 5596f7944bbaf37f9b7726c70ef4e6c7195de743 /t/perf/p0000-perf-lib-sanity.sh | |
parent | packfile: introduce 'find_kept_pack_entry()' (diff) | |
download | tgif-c9fff0001699dd2862bf350146631fe53c1226d9.tar.xz |
revision: learn '--no-kept-objects'
A future caller will want to be able to perform a reachability traversal
which terminates when visiting an object found in a kept pack. The
closest existing option is '--honor-pack-keep', but this isn't quite
what we want. Instead of halting the traversal midway through, a full
traversal is always performed, and the results are only trimmed
afterwords.
Besides needing to introduce a new flag (since culling results
post-facto can be different than halting the traversal as it's
happening), there is an additional wrinkle handling the distinction
in-core and on-disk kept packs. That is: what kinds of kept pack should
stop the traversal?
Introduce '--no-kept-objects[=<on-disk|in-core>]' to specify which kinds
of kept packs, if any, should stop a traversal. This can be useful for
callers that want to perform a reachability analysis, but want to leave
certain packs alone (for e.g., when doing a geometric repack that has
some "large" packs which are kept in-core that it wants to leave alone).
Note that this option is not guaranteed to produce exactly the set of
objects that aren't in kept packs, since it's possible the traversal
order may end up in a situation where a non-kept ancestor was "cut off"
by a kept object (at which point we would stop traversing). But, we
don't care about absolute correctness here, since this will eventually
be used as a purely additive guide in an upcoming new repack mode.
Explicitly avoid documenting this new flag, since it is only used
internally. In theory we could avoid even adding it rev-list, but being
able to spell this option out on the command-line makes some special
cases easier to test without promising to keep it behaving consistently
forever. Those tricky cases are exercised in t6114.
Signed-off-by: Taylor Blau <me@ttaylorr.com>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/perf/p0000-perf-lib-sanity.sh')
0 files changed, 0 insertions, 0 deletions