From: Jeff King Date: Tue, 31 May 2011 17:14:01 GMT Subject: Re: Re* diff: --quiet does not imply --exit-code if --diff-filter is present Message-ID: <20110531171401.GA12466@sigill.intra.peff.net> In-Reply-To: <7vd3iykdej.fsf_-_@alter.siamese.dyndns.org> On Tue, May 31, 2011 at 10:06:44AM -0700, Junio C Hamano wrote: > Add "exiting_early" field to unpack_trees_options structure, to signal the > unpack_trees() machinery that the negative return value is not signaling > an error but an early return from the unpack_trees() machinery. As this by > definition hasn't unpacked everything, discard the resulting index just > like the failure codepath. Maybe it is just me, but I would think that it's a little more intuitive to set exiting_early and then return "0" to indicate "success, but I didn't look at everything". I guess you did it this way to better share the discard-the-result codepath. Maybe it wouldn't be too painful to refactor unpack_failed() into the failed bits plus a call to a new unpack_discard() that does the non-error bits. It may not be worth the trouble though. -Peff