unpack-trees: propagate errors adding entries to the index
commit4616918013bf4fb3ce61175702d963a1fdd87f84
authorJeff King <peff@peff.net>
Mon, 24 Nov 2014 18:36:51 +0000 (24 13:36 -0500)
committerJunio C Hamano <gitster@pobox.com>
Wed, 17 Dec 2014 18:57:53 +0000 (17 10:57 -0800)
tree5ae898c80aeacb1a2046fc507d42e84f6bf07e62
parentd2446dfd7f3b3f8948142cfb07a0270e2497d93f
unpack-trees: propagate errors adding entries to the index

When unpack_trees tries to write an entry to the index,
add_index_entry may report an error to stderr, but we ignore
its return value. This leads to us returning a successful
exit code for an operation that partially failed. Let's make
sure to propagate this code.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
unpack-trees.c