diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-05-29 17:09:58 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-05-29 17:10:05 +0900 |
commit | 7913f53b5628997165e075008d6142da1c04271a (patch) | |
tree | ec9ffa97b492e873118bc9e3d521b9cab63b7098 /builtin/unpack-objects.c | |
parent | e144d126d74f5d2702870ca9423743102eec6fcd (diff) | |
parent | fc54c1af3ec09bab8b8ea09768c2da4069b7f53e (diff) | |
download | git-7913f53b5628997165e075008d6142da1c04271a.tar.gz |
Sync with Git 2.17.1
* maint: (25 commits)
Git 2.17.1
Git 2.16.4
Git 2.15.2
Git 2.14.4
Git 2.13.7
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
verify_path: disallow symlinks in .gitmodules
update-index: stat updated files earlier
verify_dotfile: mention case-insensitivity in comment
verify_path: drop clever fallthrough
skip_prefix: add case-insensitive variant
...
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 cfe9019f80..6e81ca8ca2 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); |