git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Apparent bug in git-gc

From
Jeff King <peff@peff.net>
Date
Sep 16, 2014, 00:30 UTC
Message-ID
<20140916003046.GE5019@peff.net>
In-Reply-To
<201409152334.s8FNY33M032615@hobgoblin.ariadne.com>
On Mon, Sep 15, 2014 at 07:34:03PM -0400, Dale R. Worley wrote:
> I have an 11 GB repository.  It passes git-fsck (though with a number
> of dangling objects).  But when I run git-gc on it, the file
> refs/heads/master disappears.

That's the expected behavior. Gc runs "git pack-refs", which puts an entry into packed-refs and prunes the loose ref.

> Since HEAD points to refs/heads/master, this makes the repository
> unusable.

Unusable how? Does `git rev-parse refs/heads/master` still produce a sha1? Does `git rev-parse HEAD`? If not, then that is definitely a bug.

-Peff
Previous: Dale R. WorleyNext: Dale R. Worley
Message 2 of 3 in “Apparent bug in git-gc”
  1. Dale R. WorleySep 15, 2014
  2. Jeff KingSep 16, 2014
  3. Dale R. WorleySep 16, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.