git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: mkoegler@auto.tuwien.ac.at (Martin Koegler)
Cc: git@vger.kernel.org
Subject: Re: [PATCH 1/2] parse_commit_buffer: don't parse invalid commits
Date: Mon, 14 Jan 2008 13:42:29 -0800	[thread overview]
Message-ID: <7vabn8jd8a.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <20080114205826.GB5058@auto.tuwien.ac.at> (Martin Koegler's message of "Mon, 14 Jan 2008 21:58:26 +0100")

mkoegler@auto.tuwien.ac.at (Martin Koegler) writes:

> You seem to have missed my reply to your last mail:
> http://marc.info/?l=git&m=119969163624138&w=2

Yeah, apparently I did.

> On the other hand, it is possible, that somebody pushed such a commit
> out, if he does not notice it. Then its difficult to get rid of the
> broken commit. [Hasn't happend a broken commit on pu recently?]

That's true, but I wonder if there is a reasonable middle
ground.  For example, we could keep the warning you added (by
calling error() to identify which commit object is suspicious)
without making the whole function return that error.  Then a
broken commit could have been catched while reviewing the series
before the commit gets pushed out.

>> I do not think the checks done by fsck and parse_commit should
>> share the same strictness.  They serve different purposes.
>
> Maybe I can improve fsck.

Thanks.  It should notice bogus commits but it should allow
checking objects referenced by them unless the particular
bogosity is severe enough to make "tree " and "parent " lines in
them invalid.

IOW, the information on the "author" line is not that important.
It has zero importance from the structural viewpoint, just like
the commit log message contents does not have any structural
importance (it does not even affect how the log output is sorted
at all, while the timestamp on the "committer" line has some say
in it).

Noticing a bogus "author" or "committer" line is like noticing
that your commit log message has garbage characters in it.
Maybe a future option to fsck might want to check that all log
messages are encoded in UTF-8, and you may catch some that are
in ISO-8859-1.  After flagging them as such, the program should
still continue digging the history down to check its ancestors,
as such a breakage does not affect the structural integrity of
the history.

      reply	other threads:[~2008-01-14 21:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-13 18:11 [PATCH 1/2] parse_commit_buffer: don't parse invalid commits Martin Koegler
2008-01-13 18:11 ` [PATCH 2/2] git-fsck: remove commit test already done by parse_commit_buffer Martin Koegler
2008-01-13 23:23 ` [PATCH 1/2] parse_commit_buffer: don't parse invalid commits Junio C Hamano
2008-01-14  6:46   ` Martin Koegler
2008-01-14  7:23 ` Junio C Hamano
2008-01-14 20:58   ` Martin Koegler
2008-01-14 21:42     ` Junio C Hamano [this message]

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=7vabn8jd8a.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).