[PATCH 0/2] prevent `repack` to unpack and delete promisor objects

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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`.

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(-)

-- 
2.31.0.565.gcc42f43761




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux