Re: [PATCH v2 6/9] streaming_write_entry: propagate streaming errors

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

 



Jeff King <peff@xxxxxxxx> writes:

> Subject: [PATCH] streaming_write_entry: propagate streaming errors
>
> When we are streaming an index blob to disk, we store the
> error from stream_blob_to_fd in the "result" variable, and
> then immediately overwrite that with the return value of
> "close". That means we catch errors on close (e.g., problems
> committing the file to disk), but miss anything which
> happened before then.
>
> We can fix this by using bitwise-OR to accumulate errors in
> our result variable.
>
> While we're here, we can also simplify the error handling
> with an early return, which makes it easier to see under
> which circumstances we need to clean up.
>
> Signed-off-by: Jeff King <peff@xxxxxxxx>

Very sensible.  Thanks.
--
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]