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

Re: What's going on here? Bad repo, no error locally?

From
Brandon Casey <casey@nrlssc.navy.mil>
Date
Apr 22, 2009, 16:30 UTC
Message-ID
<E0D2gLN_Jf9hLR8B78bVz8eX4lf5i3HBnK3k4LcAakE@cipher.nrlssc.navy.mil>
In-Reply-To
<450196A1AAAE4B42A00A8B27A59278E70ACE06C1@EXCHANGE.trad.tradestation.com>
John Dlugosz wrote:
Show 11 quoted lines
>> The dangling objects can happen if you push over dumb transport and
>> interrupt in the middle, or you force a push of a rewound branch, so
> it
>> does not necessarily indicate any errors, but a missing object is
>> always an error.
> 
> 
> Thanks.
> 
> That's what I thought danglings were.  But why doesn't gc get rid of
> them?
Jeff already explained why in his email to you about "dangling commits ...".

What you may not realize (and Jeff hinted at) is that unreferenced objects are created often. This is because the object must be created _before_ the reference to the object is created. The existence of a reference to an object is what differentiates a dangling,unreferenced object from one that is not dangling,unreferenced. Usually, an unreferenced object exists in the repository for a very short time before becoming referenced by the creation of a commit which references it. But, there is always some period of time that an object exists in the repository as a dangling,unreferenced object. That is why gc does not delete all dangling,unreferenced objects that it encounters immediately. As Jeff pointed out, it only deletes those that are two weeks old by default.

-brandon
Previous: John Dlugosz
Message 7 of 7 in “What's going on here? Bad repo, no error locally?”
  1. John DlugoszApr 22, 2009
  2. Bryan DonlanApr 22, 2009
  3. John M. DlugoszApr 22, 2009
  4. Bryan DonlanApr 22, 2009
  5. Junio C HamanoApr 22, 2009
  6. John DlugoszApr 22, 2009
  7. Brandon CaseyApr 22, 2009

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.