Re: [PATCH v7 02/40] builtin/apply: make apply_patch() return -1 instead of die()ing

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

 



Christian Couder <christian.couder@xxxxxxxxx> writes:

>> Before this patch, the program said "fatal: $message" and exited
>> with status = 128.  All these changes in this step modifies the
>> external behaviour and make it say "error: $message" and exit with
>> status = 1 (at least the caller in apply_all_patches() does so).
>>
>> Will that be an issue for the calling scripts?
>
> Hopefully the scripts don't check the specific error code and message.

The error codes are designed to be a vehicle that carries
information in a robust way, so it is perfectly understandable if
the callers used it to tell hopelessly broken input that caused
"die" and an otherwise sensible patch that does not happen to
apply.  Whoever is changing the external behaviour is responsible
for making sure the existing callers are not broken.

Hope is not a sound software engineering practice.
--
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]