Git development
 help / color / mirror / Atom feed
From: Frank Lichtenheld <frank@lichtenheld.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Martin Koegler <mkoegler@auto.tuwien.ac.at>
Subject: Re: [PATCH] Fix "unpack-objects --strict"
Date: Fri, 14 Aug 2009 11:30:27 +0200	[thread overview]
Message-ID: <20090814093027.GA14475@mail-vs.djpig.de> (raw)
In-Reply-To: <7vd46zbjae.fsf@alter.siamese.dyndns.org>

On Thu, Aug 13, 2009 at 12:33:45PM -0700, Junio C Hamano wrote:
> When unpack-objects is run under the --strict option, objects that have
> pointers to other objects are verified for the reachability at the end, by
> calling check_object() on each of them, and letting check_object to walk
> the reachable objects from them using fsck_walk() recursively.
> 
> The function however misunderstands the semantics of fsck_walk() function
> when it makes a call to it, setting itself as the callback.  fsck_walk()
> expects the callback function to return a non-zero value to signal an
> error (negative value causes an immediate abort, positive value is still
> an error but allows further checks on sibling objects) and return zero to
> signal a success.  The function however returned 1 on some non error
> cases, and to cover up this mistake, complained only when fsck_walk() did
> not detect any error.
> 
> To fix this double-bug, make the function return zero on all success
> cases, and also check for non-zero return from fsck_walk() for an error.

I've applied this patch and your small follow-up patch here and the error
indeed disappears. I can't comment on the semantical correctness of the
patch.

Thanks,
-- 
Frank Lichtenheld <frank@lichtenheld.de>
www: http://www.djpig.de/

      parent reply	other threads:[~2009-08-14  9:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-13 10:32 [BUG] Submodules problem with subdirectories and pushing Frank Lichtenheld
2009-08-13 11:19 ` Frank Lichtenheld
2009-08-13 19:33   ` [PATCH] Fix "unpack-objects --strict" Junio C Hamano
2009-08-14  6:03     ` Martin Koegler
2009-08-14  6:32       ` Junio C Hamano
2009-08-14  7:19         ` Martin Koegler
2009-08-14  7:31           ` Junio C Hamano
2009-08-14  7:41       ` Junio C Hamano
2009-08-14  9:30     ` Frank Lichtenheld [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=20090814093027.GA14475@mail-vs.djpig.de \
    --to=frank@lichtenheld.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --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