Skip to content

Implement localrepo methods for working with pack files

Sami Hiltunen requested to merge smh-pack-utils into master
  • Gitaly's write-ahead log needs to include pack files with the log entries in order to log the objects the transactions introduce. Along the new objects, the pack files must also include objects that are made reachable in the transaction. This guarantees the pack files will apply later from the log even if some of the unreachable objects were pruned while the pack file was sitting in the log. This commit implements WalkUnreachableObjects to help with computing such a pack file. It takes a list of new heads in the transaction and outputs a list of objects that are reachable from these heads but not from the existing references in the repository. When this is ran on a localrepo instance that has been configured with the transaction's quarantine directory as an alternate, it yields the list of new and newly reachable objects compared to the current set of references.

  • We currently have no methods to pack or unpack objects through the localrepo type. This commit adds methods on the localrepo to do so as they'll be needed later to operate on the pack files in the write-ahead log.

Part of #4790 (closed)

Merge request reports

Loading