Skip to content

Add git-pack-intersect

Lukas Sandström git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4Add git-pack-intersectMakefile pack-intersect.c sha1_file.c+581 -10 replies
2/4Add documentation for git-pack-intersectDocumentation/git-pack-intersect.txt+47 -00 replies
3/4Add git-pack-intersect to .gitignore.gitignore+1 -00 replies
4/4Make git-repack use git-pack-intersectgit-repack.sh+12 -180 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] Add git-pack-intersect

This patch series adds git-pack-intersect. It finds redundant packs by calculating the union of all objects present in .git/objects/pack and then computing the smallest set of packs which contain all the objects in this union.

It is quite fast, if I may say so myself. On my AMD3200+ it manages to minimize a linux-2.6 repository with 9 pack files totaling 430MB in ~0.7 seconds. The remaining packfiles total 102MB, which is a nice reduction.

git-fsck-objects reports no errors after pruning, but the algorithm is not proven correct so backups might be in order before this gets more testing.

/Lukas