do not pretend sha1write returns errors
commit9af270e8c2a02afd9a3262a2c9312ee7fefbb7a3
authorJeff King <peff@peff.net>
Sat, 21 Dec 2013 14:13:25 +0000 (21 09:13 -0500)
committerJunio C Hamano <gitster@pobox.com>
Thu, 26 Dec 2013 19:50:20 +0000 (26 11:50 -0800)
treecb64ac3da277efb553994e4d9fda5bad1acfbec1
parent7794a680e63a2a11b73cb1194653662f2769a792
do not pretend sha1write returns errors

The sha1write function returns an int, but it will always be
"0". The failure-prone parts of the function happen in the
"flush" callback, which cannot pass an error back to us. So
we just end up calling die() during the flush.

Let's just drop the return value altogether, as it only
confuses callers into thinking that it might be useful.

Only one call site actually checked the return value. We can
drop that check, since it just led to a die() anyway.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/pack-objects.c
csum-file.c
csum-file.h
pack-write.c