Thread (7 messages) flat view 7 messages, 3 authors, 2016-06-15

Re: Git gc removes all packs

From: Jeff King <hidden>
Date: 2016-06-15 23:03:56

On Fri, Feb 27, 2015 at 11:16:09AM +0100, Dmitry Neverov wrote:
I followed your advice and removed a symlink ref from my repository.
But didn't help.. automatic GC has just removed all packs again. May
alternates cause such a behavior? Are any ways to make gc log
somewhere why it removes packs?
If you have two repositories, A and B, and A points to B via alternates,
then you cannot safely run "git gc" in B unless it knows about all of
the refs in A. As we discussed before, symlinking the refs is not
enough, because those symlinks get stale. But nor is removing the
symlinks and just not knowing about the refs. :)

The only safe thing to do is to fetch all of the refs from A into B just
before running the gc (and consequently, you probably want to disable
gc.auto in B).

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help