How to handle the pack files now we have switched to git?
Pete French
petefrench at ingresso.co.uk
Fri Jan 8 10:47:43 UTC 2021
On 06/01/2021 15:47, Ulrich Spörlein wrote:
> That's not entirely correct. The packfile will only be rewritten if
> a) enough other stuff has accumulated
> b) you force a repack.
>
> You are fighting against git's GC mechanism a bit here, but you can
> still make it work. On your source of truth host, do the following:
>
> 1. git gc --aggressive
> 2. look at .git/objects/pack, there should be a single big pack
> 3. touch .git/objects/pack/pack-<whateverhash>.keep (or was it
> .pack.keep?)
> 4. rsync --del to all other hosts
>
> Now future git gc runs will not delete that big pack, you'll only get
> churn in the new, much smaller, packs.
I missed seeing this until now, sorry, but thankyou! This is excellent,
and looks like a much better solution - or at least one which lets me
know 100% that I have percisely the same files on each machine. I will
gve this a try next time I need to do an update.
thanks,
-pete.
More information about the freebsd-stable
mailing list