write-tree: properly detect failure to write tree objects
commitedae5f0c20b7e71a717b59873ddb8eeddfa49b86
authorJunio C Hamano <gitster@pobox.com>
Wed, 23 Apr 2008 16:47:17 +0000 (23 09:47 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 23 Apr 2008 17:02:44 +0000 (23 10:02 -0700)
tree697e01ec44ef6fa86e25a816d143e2a9400b662e
parent4f7ec7970874d09be162bc7f16415a0ec2d36ae5
write-tree: properly detect failure to write tree objects

Tomasz Fortuna reported that "git commit" does not error out properly when
it cannot write tree objects out.  "git write-tree" shares the same issue,
as the failure to notice the error is deep in the logic to write tree
objects out recursively.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
cache-tree.c
t/t0004-unwritable.sh [new file with mode: 0755]