From: Junio C Hamano Date: Wed, 16 Sep 2009 21:45:18 +0000 (-0700) Subject: Merge branch 'jc/maint-unpack-objects-strict' into maint X-Git-Tag: v1.6.4.4~1 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=af4f6405296dec699321ca59d48583ffa0323b0e;p=git.git Merge branch 'jc/maint-unpack-objects-strict' into maint * jc/maint-unpack-objects-strict: Fix "unpack-objects --strict" Conflicts: builtin-unpack-objects.c --- af4f6405296dec699321ca59d48583ffa0323b0e diff --cc builtin-unpack-objects.c index 557148a69,bae00eabb..3d650a1c4 --- 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,