[prev in list] [next in list] [prev in thread] [next in thread] 

List:       git
Subject:    Re: Git gc removes all packs
From:       Jeff King <peff () peff ! net>
Date:       2015-02-27 13:14:26
Message-ID: 20150227131425.GA13005 () peff ! net
[Download RAW message or body]

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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic