git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Turner <dturner@twopensource.com>
To: git mailing list <git@vger.kernel.org>
Subject: verify_pack ignores return value of verify_fn
Date: Tue, 17 Nov 2015 19:31:55 -0500	[thread overview]
Message-ID: <1447806715.5082.11.camel@twopensource.com> (raw)

In pack-check.c, line 129, a caller-supplied verification function is
called.  The function returns an int, but that return value is ignored.

The only caller of verify_pack is in builtin/fsck.c, whose verify_fn
*does* return a meaningful error code (which is then ignored).  If it
were not ignored, fsck might return a different error code (in the
unlikely event that a weird object gets into a pack and is somehow not 
totally corrupt enough to fail an earlier check).

I think we should probably have verify_pack return a non-zero result if
any call to verify_fn returns a non-zero result.  Any objections to
this?

             reply	other threads:[~2015-11-18  0:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-18  0:31 David Turner [this message]
2015-11-24 22:11 ` verify_pack ignores return value of verify_fn Jeff King

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=1447806715.5082.11.camel@twopensource.com \
    --to=dturner@twopensource.com \
    --cc=git@vger.kernel.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).