git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Johannes Schindelin <johannes.schindelin@gmx.de>
Cc: Michael Haggerty <mhagger@alum.mit.edu>,
	Junio C Hamano <gitster@pobox.com>,
	git@vger.kernel.org
Subject: Re: [PATCH 2/2] fsck: report errors if reflog entries point at invalid objects
Date: Mon, 8 Jun 2015 12:56:44 -0400	[thread overview]
Message-ID: <20150608165643.GA6863@peff.net> (raw)
In-Reply-To: <c5720357601be135485ef546cae7ffdb@www.dscho.org>

On Mon, Jun 08, 2015 at 06:00:09PM +0200, Johannes Schindelin wrote:

> >> I like the idea, but I am a bit uncertain whether it would constitute
> >> "too backwards-incompatible" a change to make this an error. I think
> >> it could be argued both ways: it *is* an improvement, but it could
> >> also possibly disrupt scripts that work pretty nicely at the moment.
> > 
> > What kind of script are you worried about?
> 
> I was concerned about scripts that work on repositories whose reflogs
> become inconsistent for whatever reason (that happened a lot to me in
> the past, IIRC it had something to do with bare repositories and/or
> shared object databases).

I think these repositories are already broken. You cannot run `git gc`
in such a repository, as it will barf when trying to walk the reflog
tips during `git repack`.

We run into this exact situation at GitHub because of our shared object
databases. Our per-fork repack code basically has to do:

  if ! git repack ...; then
    git reflog expire --expire-unreachable=all --all &&
    git repack ... ||
    die "ok, it really is broken"
  fi

-Peff

  reply	other threads:[~2015-06-08 16:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-08 13:40 [PATCH 0/2] fsck: don't ignore broken reflog entries Michael Haggerty
2015-06-08 13:40 ` [PATCH 1/2] fsck_handle_reflog_sha1(): new function Michael Haggerty
2015-06-08 14:18   ` Johannes Schindelin
2015-06-08 15:07   ` Junio C Hamano
2015-06-08 15:17     ` Michael Haggerty
2015-06-08 13:40 ` [PATCH 2/2] fsck: report errors if reflog entries point at invalid objects Michael Haggerty
2015-06-08 14:27   ` Johannes Schindelin
2015-06-08 15:09     ` Michael Haggerty
2015-06-08 16:00       ` Johannes Schindelin
2015-06-08 16:56         ` Jeff King [this message]
2015-06-08 17:08           ` Johannes Schindelin

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=20150608165643.GA6863@peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=johannes.schindelin@gmx.de \
    --cc=mhagger@alum.mit.edu \
    /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;
as well as URLs for NNTP newsgroup(s).