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

2013-03-26 Thread Junio C Hamano
Jeff King  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 

Very sensible.  Thanks.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

2013-03-25 Thread Jonathan Nieder
Jeff King wrote:

> Both fixed in my re-roll.

Thanks!  This and the rest of the patches up to and including patch 8
look good to me.

I haven't decided what to think about patch 9 yet, but I suspect it
would be good, too.  In the long term I suspect "git clone
--worktree-only " (or some other standard interface for
git-new-workdir functionality) is a better way to provide a convenient
lightweight same-machine clone anyway.

Jonathan
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html