From: Nicolas Pitre <nico@cam.org>
To: "Shawn O. Pearce" <spearce@spearce.org>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>,
Pieter de Bie <pdebie@ai.rug.nl>,
git@vger.kernel.org
Subject: Re: How to replace a single corrupt, packed object?
Date: Sun, 10 Aug 2008 23:40:30 -0400 (EDT) [thread overview]
Message-ID: <alpine.LFD.1.10.0808102325280.22892@xanadu.home> (raw)
In-Reply-To: <20080811030744.GD27195@spearce.org>
On Sun, 10 Aug 2008, Shawn O. Pearce wrote:
> Nicolas Pitre <nico@cam.org> wrote:
> > OK, here's what the patch to allow repacking without -f and still using
> > redundant objects in presence of pack corruption might look like.
> > Please tell me if that works for you.
>
> Aside from goto being considered harmful by some really smart people,
Well, other really smart people consider gotos perfectly fine when used
judiciously. So this ends up being a question of belief and taste.
> this patch makes a lot of sense. Its only downside is a backwards
> goto within this function, but the code is actually still quite
> clear to me.
The actual downside I see with this patch is the fact that real data
corruptions might be "fixed" automagically with user unaware of it.
This could be a serious sign that the hardware is going bad and
requiring the user to consciously use -f to fix things is good. However
it is most unlikely that redundant objects will be kept around in the
normal case, hence manual intervention will be needed anyway to bring a
copy of bad object into the repository. So not having to use -f might
not be such an issue.
> If this allows git to magically fix Dscho's bad pack, it may be
> worth including in the core tree.
Yep.
Nicolas
next prev parent reply other threads:[~2008-08-11 3:41 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-08 14:41 How to replace a single corrupt, packed object? Johannes Schindelin
2008-08-08 14:39 ` Shawn O. Pearce
2008-08-08 14:50 ` Johannes Schindelin
2008-08-08 15:21 ` Johannes Schindelin
2008-08-08 16:23 ` Shawn O. Pearce
2008-08-08 15:30 ` Pieter de Bie
2008-08-08 16:19 ` Shawn O. Pearce
[not found] ` <90E12BC7-1950-41DF-8BE5-C6B63CE060D9@ai.rug.nl>
2008-08-08 16:36 ` Shawn O. Pearce
2008-08-08 16:48 ` Johannes Schindelin
2008-08-11 2:55 ` Nicolas Pitre
2008-08-11 3:07 ` Shawn O. Pearce
2008-08-11 3:40 ` Nicolas Pitre [this message]
2008-08-11 3:46 ` Shawn O. Pearce
2008-08-11 18:59 ` Johannes Schindelin
2008-08-11 1:43 ` Nicolas Pitre
2008-09-15 14:05 ` Johannes Schindelin
2008-09-15 16:26 ` Nicolas Pitre
2008-09-15 16:34 ` 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=alpine.LFD.1.10.0808102325280.22892@xanadu.home \
--to=nico@cam.org \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=pdebie@ai.rug.nl \
--cc=spearce@spearce.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;
as well as URLs for NNTP newsgroup(s).