git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Martin Koegler <mkoegler@auto.tuwien.ac.at>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 2/3] fsck_commit: remove duplicate tests
Date: Sun, 03 Feb 2008 15:58:57 -0800	[thread overview]
Message-ID: <7v3as9r3r2.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: 12020737601683-git-send-email-mkoegler@auto.tuwien.ac.at

Martin Koegler <mkoegler@auto.tuwien.ac.at> writes:

> All tests on the commit buffer in fsck_cmd are ready done by
> parse_commit_buffer.
>
> This patch rips out all redundant tests.

As I believe in belt-and-suspenders when it comes to validation,
I am somewhat uneasy with this change.  If it ever turns out
that we would need to make parse_commit_buffer() more lenient
during the normal operation, some of this would need to be
reverted (for example, you may not need to have a valid "tree"
to salvage the log messages from a corrupt history by running
"git log"), and forgetting to do so will result in fsck that
does not validate enough.

The validation done by parse_commit_buffer() and fsck serve two
different purposes, and they can have different leniency
requirements.  I do not necessarily agree that it is a good idea
to tie them together like this patch.

  parent reply	other threads:[~2008-02-03 23:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-03 21:22 [PATCH 1/3] git-fsck: report missing author/commit line in a commit as an error Martin Koegler
2008-02-03 21:22 ` [PATCH 2/3] fsck_commit: remove duplicate tests Martin Koegler
2008-02-03 21:22   ` [PATCH 3/3] parse_object_buffer: don't ignore errors from the object specific parsing functions Martin Koegler
2008-02-03 23:58   ` Junio C Hamano [this message]
2008-02-04  0:04     ` [PATCH 2/3] fsck_commit: remove duplicate tests Johannes Schindelin
2008-02-04  7:06       ` Martin Koegler
2008-02-04  7:33         ` Junio C Hamano

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=7v3as9r3r2.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=mkoegler@auto.tuwien.ac.at \
    /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).