author | Junio C Hamano <gitster@pobox.com> | |
Thu, 27 Aug 2009 23:59:08 +0000 (16:59 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 27 Aug 2009 23:59:08 +0000 (16:59 -0700) |
* jc/maint-unpack-objects-strict:
Fix "unpack-objects --strict"
Conflicts:
builtin-unpack-objects.c
Fix "unpack-objects --strict"
Conflicts:
builtin-unpack-objects.c
1 | 2 | |||
---|---|---|---|---|
builtin-unpack-objects.c | patch | | diff1 | | diff2 | | blob | history |
diff --cc builtin-unpack-objects.c
index 968fda7219807de9985c06eccd0812da04a149ae,bae00eabb0f8b712f2d737fe86cbd56421e0b441..685566e0b5e458c510fdf989744d63dda29e28f0
+++ b/builtin-unpack-objects.c
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,