Rafael Silva <rafaeloliveira.cs@xxxxxxxxx> writes: > This series is built on top of jk/promisor-optim. It conflicts with > changes on p5600 otherwise. > > The following patches fixes the issue where we unnecessarily turn loose > all the promisor objects and deletes them right after when running > `repack -A -d ..` (via `git gc) for a partial repository. > > Special thanks to Peff, for proposing a better approach for managing > the situation and for Jonathan Tan for earlier interaction on the > solution. Previously, I thought we should skip the promisor objects > by just adding a check in loosened_object_can_be_discarded(). However, > Peff pointed out that we can do better by realizing much sooner that > we should not even consider loosening the objects for the _old_ promisor > packs. > > It took me a bit to come up with the test because it seems `repack` > doesn't offer an option to skip the "deletion of unpacked objects", > so this series adds a new option to `repack` for skip the > `git prune-packed` execution thus allowing us to easily inspect the > unpacked objects before they are removed and simplification of our > test suite. Furthermore, The test will now test the `repack` code > path instead of performing the operations by calling > `pack-objects`. Beautiful. Thanks for working so well together, all of you. > Rafael Silva (2): > repack: teach --no-prune-packed to skip `git prune-packed` > repack: avoid loosening promisor pack objects in partial clones > > Documentation/git-repack.txt | 5 +++++ > builtin/repack.c | 15 ++++++++++++--- > t/perf/p5600-partial-clone.sh | 4 ++++ > t/t5616-partial-clone.sh | 9 +++++++++ > t/t7700-repack.sh | 23 +++++++++++------------ > 5 files changed, 41 insertions(+), 15 deletions(-)