{"thread":{"id":"37576","subject":"Apparent bug in git-gc","startedAt":"2014-09-15T23:34:03Z","lastAt":"2014-09-16T18:09:13Z","messageCount":3,"participants":["Dale R. Worley","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"249494","messageId":"201409152334.s8FNY33M032615@hobgoblin.ariadne.com","threadId":"37576","inReplyTo":null,"subject":"Apparent bug in git-gc","fromName":"Dale R. Worley","fromEmail":"worley@alum.mit.edu","sentAt":"2014-09-15T23:34:03Z","receivedAt":"2014-09-15T23:34:03Z","isPatch":false,"sender":{"key":"worley@alum.mit.edu","avatar":"https://avatars.githubusercontent.com/u/19911107?v=4"},"body":"I have an unpleasant bug in git-gc:\n\nGit version:  1.8.3.1\nRunning on:  Fedora 19 Gnu/Linux\n\nI have an 11 GB repository.  It passes git-fsck (though with a number\nof dangling objects).  But when I run git-gc on it, the file\nrefs/heads/master disappears.  Since HEAD points to refs/heads/master,\nthis makes the repository unusable.\n\nWhat should I do next?\n\nDale\n"},{"id":"249499","messageId":"20140916003046.GE5019@peff.net","threadId":"37576","inReplyTo":"201409152334.s8FNY33M032615@hobgoblin.ariadne.com","subject":"Re: Apparent bug in git-gc","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2014-09-16T00:30:47Z","receivedAt":"2014-09-16T00:30:47Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Sep 15, 2014 at 07:34:03PM -0400, Dale R. Worley wrote:\n\n> I have an 11 GB repository.  It passes git-fsck (though with a number\n> of dangling objects).  But when I run git-gc on it, the file\n> refs/heads/master disappears.\n\nThat's the expected behavior. Gc runs \"git pack-refs\", which puts an\nentry into packed-refs and prunes the loose ref.\n\n> Since HEAD points to refs/heads/master, this makes the repository\n> unusable.\n\nUnusable how?  Does `git rev-parse refs/heads/master` still produce a\nsha1? Does `git rev-parse HEAD`? If not, then that is definitely a bug.\n\n-Peff\n"},{"id":"249509","messageId":"201409161809.s8GI9Dd4002425@hobgoblin.ariadne.com","threadId":"37576","inReplyTo":"20140916003046.GE5019@peff.net","subject":"Re: Apparent bug in git-gc","fromName":"Dale R. Worley","fromEmail":"worley@alum.mit.edu","sentAt":"2014-09-16T18:09:13Z","receivedAt":"2014-09-16T18:09:13Z","isPatch":false,"sender":{"key":"worley@alum.mit.edu","avatar":"https://avatars.githubusercontent.com/u/19911107?v=4"},"body":"> From: Jeff King <peff@peff.net>\n> \n> > I have an 11 GB repository.  It passes git-fsck (though with a number\n> > of dangling objects).  But when I run git-gc on it, the file\n> > refs/heads/master disappears.\n> \n> That's the expected behavior. Gc runs \"git pack-refs\", which puts an\n> entry into packed-refs and prunes the loose ref.\n\nArrrgh, damn!  I knew that but I forgot it.  Sorry about the trouble.\n\n(At least I don't have to worry about fixing it now.)\n\nDale\n"}]}