summaryrefslogtreecommitdiff
path: root/sha1-file.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2019-01-07 08:40:34 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-01-08 17:41:06 (GMT)
commit01f8d5948a7f370c42d9fe2deb724139a1bfcb7b (patch)
tree796eed07f27c8e12a203463558763320b2e4aeb4 /sha1-file.c
parent2c319886c04c5e77da55c66ee9e860b101e5af32 (diff)
downloadgit-01f8d5948a7f370c42d9fe2deb724139a1bfcb7b.zip
git-01f8d5948a7f370c42d9fe2deb724139a1bfcb7b.tar.gz
git-01f8d5948a7f370c42d9fe2deb724139a1bfcb7b.tar.bz2
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 <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sha1-file.c')
-rw-r--r--sha1-file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sha1-file.c b/sha1-file.c
index 39cdf37..2356459 100644
--- a/sha1-file.c
+++ b/sha1-file.c
@@ -2218,7 +2218,7 @@ static int check_stream_oid(git_zstream *stream,
the_hash_algo->final_fn(real_oid.hash, &c);
if (!oideq(expected_oid, &real_oid)) {
- error(_("sha1 mismatch for %s (expected %s)"), path,
+ error(_("hash mismatch for %s (expected %s)"), path,
oid_to_hex(expected_oid));
return -1;
}
@@ -2270,7 +2270,7 @@ int read_loose_object(const char *path,
}
if (check_object_signature(expected_oid, *contents,
*size, type_name(*type))) {
- error(_("sha1 mismatch for %s (expected %s)"), path,
+ error(_("hash mismatch for %s (expected %s)"), path,
oid_to_hex(expected_oid));
free(*contents);
goto out;