Skip to content

Commit db5a58c

Browse files
committed
index-pack: make fsck error message more specific
If fsck reports an error, we say only "Error in object". This isn't quite as bad as it might seem, since the fsck code would have dumped some errors to stderr already. But it might help to give a little more context. The earlier output would not have even mentioned "fsck", and that may be a clue that the "fsck.*" or "*.fsckObjects" config may be relevant. Signed-off-by: Jeff King <[email protected]>
1 parent eedd594 commit db5a58c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

builtin/index-pack.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,7 @@ static void sha1_object(const void *data, struct object_entry *obj_entry,
853853
die(_("invalid %s"), type_name(type));
854854
if (do_fsck_object &&
855855
fsck_object(obj, buf, size, &fsck_options))
856-
die(_("Error in object"));
856+
die(_("fsck error in packed object"));
857857
if (strict && fsck_walk(obj, NULL, &fsck_options))
858858
die(_("Not all child objects of %s are reachable"), oid_to_hex(&obj->oid));
859859

builtin/unpack-objects.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ static int check_object(struct object *obj, int type, void *data, struct fsck_op
210210
if (!obj_buf)
211211
die("Whoops! Cannot find object '%s'", oid_to_hex(&obj->oid));
212212
if (fsck_object(obj, obj_buf->buffer, obj_buf->size, &fsck_options))
213-
die("Error in object");
213+
die("fsck error in packed object");
214214
fsck_options.walk = check_object;
215215
if (fsck_walk(obj, NULL, &fsck_options))
216216
die("Error on reachable objects of %s", oid_to_hex(&obj->oid));

0 commit comments

Comments
 (0)