diff options
| author | Junio C Hamano <gitster@pobox.com> | 2018-05-22 14:26:05 +0900 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2018-05-22 14:26:05 +0900 |
| commit | 9e84a6d7580c3714a2c1c152d7820ccc93232a71 (patch) | |
| tree | 8618cf1c227b0715cea19d1174dbcdeb357f4d71 /builtin/unpack-objects.c | |
| parent | 68f95b26e43f8183b9d1cdd41f42e99da43152bf (diff) | |
| parent | b7b1fca175f1ed7933f361028c631b9ac86d868d (diff) | |
Merge branch 'jk/submodule-fsck-loose' into maint
* jk/submodule-fsck-loose:
fsck: complain when .gitmodules is a symlink
index-pack: check .gitmodules files with --strict
unpack-objects: call fsck_finish() after fscking objects
fsck: call fsck_finish() after fscking objects
fsck: check .gitmodules content
fsck: handle promisor objects in .gitmodules check
fsck: detect gitmodules files
fsck: actually fsck blob data
fsck: simplify ".git" check
index-pack: make fsck error message more specific
Diffstat (limited to 'builtin/unpack-objects.c')
| -rw-r--r-- | builtin/unpack-objects.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/builtin/unpack-objects.c b/builtin/unpack-objects.c index 6620feec68..c8f1406d23 100644 --- a/builtin/unpack-objects.c +++ b/builtin/unpack-objects.c @@ -210,7 +210,7 @@ static int check_object(struct object *obj, int type, void *data, struct fsck_op if (!obj_buf) die("Whoops! Cannot find object '%s'", oid_to_hex(&obj->oid)); if (fsck_object(obj, obj_buf->buffer, obj_buf->size, &fsck_options)) - die("Error in object"); + die("fsck error in packed object"); fsck_options.walk = check_object; if (fsck_walk(obj, NULL, &fsck_options)) die("Error on reachable objects of %s", oid_to_hex(&obj->oid)); @@ -572,8 +572,11 @@ int cmd_unpack_objects(int argc, const char **argv, const char *prefix) unpack_all(); the_hash_algo->update_fn(&ctx, buffer, offset); the_hash_algo->final_fn(oid.hash, &ctx); - if (strict) + if (strict) { write_rest(); + if (fsck_finish(&fsck_options)) + die(_("fsck error in pack objects")); + } if (hashcmp(fill(the_hash_algo->rawsz), oid.hash)) die("final sha1 did not match"); use(the_hash_algo->rawsz); |
