From: Junio C Hamano <gitster@pobox.com>
To: Erik Faye-Lund <kusmabite@googlemail.com>
Cc: Erik Faye-Lund <kusmabite@gmail.com>,
git@vger.kernel.org,
Johannes Schindelin <johannes.schindelin@gmx.de>,
"Shawn O. Pearce" <spearce@spearce.org>
Subject: Re: [PATCH] builtin-fast-export.c: add default case to avoid crash on corrupt repo
Date: Sun, 22 Mar 2009 14:58:53 -0700 [thread overview]
Message-ID: <7vwsahcj8i.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: 40aa078e0903220522g66cf2172l9f1a43ed562cc4d3@mail.gmail.com
Erik Faye-Lund <kusmabite@googlemail.com> writes:
> Anyway, I guess this makes the most sense as a four-patch series:
> 1) Add test-cases for tags of tag objects, tag objects of tag objects,
> tags of trees and tag objects of trees.
> 2) Turn the existing error into a warning
> 3) Add the missing warning and remove the crash
> 4) Fix fast-export to export tags pointing to tags.
>
> Makes sense?
Yes.
I suspect we will hear an argument that say the dying is deliberate
because pretending to have produced a faithful export while some
information is lacking is bad and warnings are easy to miss, and I would
certainly understand that argument.
We have similar issue with signed tags and filter-branch, which strips the
signature when it rewrites the history. I recall the code originally died
for the same reasoning, but asking "it died; what can the user do now?"
made us realize that it is the best we can do to make best-effort
reproduction with a warning when losing information.
This falls into the same category. I think "we die by default if we
cannot give a faithful reproduction, and the user needs to give an
explicit permission (e.g. --force option) to lose information", is a very
sensible thing to do, but "we die if we cannot export some things, and we
refuse to produce an approximation." without an escape hatch is not.
next prev parent reply other threads:[~2009-03-22 22:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-21 22:37 [PATCH] builtin-fast-export.c: add default case to avoid crash on corrupt repo Erik Faye-Lund
2009-03-21 23:54 ` Junio C Hamano
2009-03-22 12:22 ` Erik Faye-Lund
2009-03-22 12:32 ` Erik Faye-Lund
2009-03-22 21:58 ` Junio C Hamano [this message]
2009-03-23 0:26 ` Shawn O. Pearce
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=7vwsahcj8i.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=johannes.schindelin@gmx.de \
--cc=kusmabite@gmail.com \
--cc=kusmabite@googlemail.com \
--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).