Re: Git gc removes all packs

2015-02-27 Thread Jeff King
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

Re: Git gc removes all packs

2015-02-27 Thread Dmitry Neverov
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? On Thu, Feb 5, 2015 at 9:03 PM, Jeff King p...@peff.net wrote:

Re: Git gc removes all packs

2015-02-17 Thread Junio C Hamano
Michael Haggerty mhag...@alum.mit.edu writes: On 02/17/2015 10:57 PM, Junio C Hamano wrote: ... Do you mean that we would end up reading refs/heads/hold if the user did this: git rev-parse --verify HEAD -- precious ln -s ../../../precious .git/refs/heads/hold because that

Re: Git gc removes all packs

2015-02-17 Thread Jeff King
On Tue, Feb 17, 2015 at 05:39:27PM +0100, Michael Haggerty wrote: You can't symlink refs like this. The loose refs in the filesystem may be migrated into the packed-refs file, at which point your symlink will be broken. That is a likely reason why git would not find any refs. So your

Re: Git gc removes all packs

2015-02-17 Thread Michael Haggerty
On 02/05/2015 09:03 PM, Jeff King wrote: On Thu, Feb 05, 2015 at 04:13:03PM +0100, Dmitry Neverov wrote: [...] One more thing about my setup: since git p4 promotes a use of a linear history I use a separate repository for another branch in perforce. In order to be able to cherry-pick between

Re: Git gc removes all packs

2015-02-17 Thread Michael Haggerty
On 02/17/2015 05:55 PM, Jeff King wrote: On Tue, Feb 17, 2015 at 05:39:27PM +0100, Michael Haggerty wrote: You can't symlink refs like this. The loose refs in the filesystem may be migrated into the packed-refs file, at which point your symlink will be broken. That is a likely reason why git

Re: Git gc removes all packs

2015-02-17 Thread Junio C Hamano
Michael Haggerty mhag...@alum.mit.edu writes: On 02/17/2015 05:55 PM, Jeff King wrote: On Tue, Feb 17, 2015 at 05:39:27PM +0100, Michael Haggerty wrote: There's a bunch of code in refs.c that is there explicitly for reading loose references that are symlinks. If the link contents literally

Re: Git gc removes all packs

2015-02-17 Thread Michael Haggerty
On 02/17/2015 10:57 PM, Junio C Hamano wrote: Michael Haggerty mhag...@alum.mit.edu writes: On 02/17/2015 05:55 PM, Jeff King wrote: On Tue, Feb 17, 2015 at 05:39:27PM +0100, Michael Haggerty wrote: There's a bunch of code in refs.c that is there explicitly for reading loose references

Git gc removes all packs

2015-02-05 Thread Dmitry Neverov
Hi, I'm experiencing a strange behavior of automatic git gc which corrupts a local repository. Git version 2.2.2 on Mac OS X 10.10.1. I'm using git p4 for synchronization with perforce. Sometimes after 'git p4 rebase' git starts a garbage collection. When gc finishes a local repository contains

Re: Git gc removes all packs

2015-02-05 Thread Jeff King
On Thu, Feb 05, 2015 at 04:13:03PM +0100, Dmitry Neverov wrote: I'm using git p4 for synchronization with perforce. Sometimes after 'git p4 rebase' git starts a garbage collection. When gc finishes a local repository contains no pack files only loose objects, so I have to re-import repository