From: Junio C Hamano Date: Thu, 27 Aug 2009 23:59:08 +0000 (-0700) Subject: Merge branch 'jc/maint-unpack-objects-strict' X-Git-Tag: v1.6.5-rc0~33 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ab36d06f12b7243de419bb82b11a678bea30eef2;p=git.git Merge branch 'jc/maint-unpack-objects-strict' * jc/maint-unpack-objects-strict: Fix "unpack-objects --strict" Conflicts: builtin-unpack-objects.c --- ab36d06f12b7243de419bb82b11a678bea30eef2 diff --cc builtin-unpack-objects.c index 968fda721,bae00eabb..685566e0b --- a/builtin-unpack-objects.c +++ b/builtin-unpack-objects.c @@@ -200,17 -200,19 +200,19 @@@ static int check_object(struct object * if (fsck_object(obj, 1, fsck_error_function)) die("Error in object"); - if (!fsck_walk(obj, check_object, NULL)) - if (fsck_walk(obj, check_object, 0)) ++ if (fsck_walk(obj, check_object, NULL)) die("Error on reachable objects of %s", sha1_to_hex(obj->sha1)); write_cached_object(obj); - return 1; + return 0; } static void write_rest(void) { unsigned i; - for (i = 0; i < nr_objects; i++) - check_object(obj_list[i].obj, OBJ_ANY, NULL); + for (i = 0; i < nr_objects; i++) { + if (obj_list[i].obj) - check_object(obj_list[i].obj, OBJ_ANY, 0); ++ check_object(obj_list[i].obj, OBJ_ANY, NULL); + } } static void added_object(unsigned nr, enum object_type type,