Git development
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Bryan Turner <bturner@atlassian.com>
Cc: Git Users <git@vger.kernel.org>
Subject: Re: 2.2.0-rc behavior changes (2/2)
Date: Mon, 10 Nov 2014 04:31:28 -0500	[thread overview]
Message-ID: <20141110093128.GB11387@peff.net> (raw)
In-Reply-To: <CAGyf7-GWBWrV9SjMY3n3B-0gCMZGfEsYfX-0vSvz6GT6r=vO6A@mail.gmail.com>

On Mon, Nov 10, 2014 at 07:51:00PM +1100, Bryan Turner wrote:

> 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

  reply	other threads:[~2014-11-10  9:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-10  8:51 2.2.0-rc behavior changes (2/2) Bryan Turner
2014-11-10  9:31 ` Jeff King [this message]
2014-11-10 10:45   ` Bryan Turner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141110093128.GB11387@peff.net \
    --to=peff@peff.net \
    --cc=bturner@atlassian.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox