Re: Re* diff: --quiet does not imply --exit-code if --diff-filter is present

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]