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

Re: 2.2.0-rc behavior changes (2/2)

From
Jeff King <peff@peff.net>
Date
Nov 10, 2014, 09:31 UTC
Message-ID
<20141110093128.GB11387@peff.net>
In-Reply-To
<CAGyf7-GWBWrV9SjMY3n3B-0gCMZGfEsYfX-0vSvz6GT6r=vO6A@mail.gmail.com>
On Mon, Nov 10, 2014 at 07:51:00PM +1100, Bryan Turner wrote:
Show 6 quoted lines
> Second change: git gc --auto now fails if there are loose empty blobs.
> 
> We have a test which just touched empty files in objects/17 to trigger
> the gc --auto preconditions (Note: I realize this is completely
> invalid, and I've changed the test to no longer do this; I'm only
> surfacing the behavioral change).
This is expected. As you noticed here:
> error: object file
> .git/objects/17/02d54e8fba95ef9968a0c9b183fe22ec551c86 is empty
> fatal: unable to get object info for 1702d54e8fba95ef9968a0c9b183fe22ec551c86
> error: failed to run prune

the error comes from "git prune" failing. It is using unreachable but "recent" objects as graph tips to keep around. If we can't load a tip object, we abort the prune, because we would not want to delete objects that might have been referenced (e.g., if it were a real corrupted object that we could not read).

The second behavior (die on broken objects) has been around for a while. The new change (in the commit you bisected to) is that we are considering more objects.

I'll admit I didn't really consider the impact on sticking broken object files into the object directory, but I think the code is doing the sensible and safe thing.

-Peff
Previous: Bryan TurnerNext: Bryan Turner
Message 2 of 3 in “2.2.0-rc behavior changes (2/2)”
  1. Bryan TurnerNov 10, 2014
  2. Jeff KingNov 10, 2014
  3. Bryan TurnerNov 10, 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.