From 01f8d5948a7f370c42d9fe2deb724139a1bfcb7b Mon Sep 17 00:00:00 2001 From: Jeff King Date: Mon, 7 Jan 2019 03:40:34 -0500 Subject: prefer "hash mismatch" to "sha1 mismatch" To future-proof ourselves against a change in the hash, let's use the more generic "hash mismatch" to refer to integrity problems. Note that we do advertise this exact string in git-fsck(1). However, the message itself is marked for translation, meaning we do not expect it to be machine-readable. While we're touching that documentation, let's also update it for grammar and clarity. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- object.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'object.c') diff --git a/object.c b/object.c index a5c5cf830f..df72914bdc 100644 --- a/object.c +++ b/object.c @@ -263,7 +263,7 @@ struct object *parse_object(struct repository *r, const struct object_id *oid) (!obj && has_object_file(oid) && oid_object_info(r, oid, NULL) == OBJ_BLOB)) { if (check_object_signature(repl, NULL, 0, NULL) < 0) { - error(_("sha1 mismatch %s"), oid_to_hex(oid)); + error(_("hash mismatch %s"), oid_to_hex(oid)); return NULL; } parse_blob_buffer(lookup_blob(r, oid), NULL, 0); @@ -274,7 +274,7 @@ struct object *parse_object(struct repository *r, const struct object_id *oid) if (buffer) { if (check_object_signature(repl, buffer, size, type_name(type)) < 0) { free(buffer); - error(_("sha1 mismatch %s"), oid_to_hex(repl)); + error(_("hash mismatch %s"), oid_to_hex(repl)); return NULL; } -- cgit v1.2.3