summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2019-01-07 08:39:24 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-01-08 17:41:06 (GMT)
commit760113574ff6f503001e2c75b96233b8752cbc37 (patch)
tree05b2d3f98213868f8b7c507b17cb5f14d8256e66
parent5d3679ee023642825a5d3c0ca1eec251588a1848 (diff)
downloadgit-760113574ff6f503001e2c75b96233b8752cbc37.zip
git-760113574ff6f503001e2c75b96233b8752cbc37.tar.gz
git-760113574ff6f503001e2c75b96233b8752cbc37.tar.bz2
sha1-file: prefer "loose object file" to "sha1 file" in messages
When we're reporting an error for a loose object, let's use that term. It's more consistent with other parts of Git, and it is future-proof against changes to the hash function. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--sha1-file.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sha1-file.c b/sha1-file.c
index 0d926e3..7a121f3 100644
--- a/sha1-file.c
+++ b/sha1-file.c
@@ -1552,9 +1552,9 @@ int hash_object_file(const void *buf, unsigned long len, const char *type,
static void close_loose_object(int fd)
{
if (fsync_object_files)
- fsync_or_die(fd, "sha1 file");
+ fsync_or_die(fd, "loose object file");
if (close(fd) != 0)
- die_errno(_("error when closing sha1 file"));
+ die_errno(_("error when closing loose object file"));
}
/* Size of directory component, including the ending '/' */
@@ -1645,7 +1645,7 @@ static int write_loose_object(const struct object_id *oid, char *hdr,
ret = git_deflate(&stream, Z_FINISH);
the_hash_algo->update_fn(&c, in0, stream.next_in - in0);
if (write_buffer(fd, compressed, stream.next_out - compressed) < 0)
- die(_("unable to write sha1 file"));
+ die(_("unable to write loose object file"));
stream.next_out = compressed;
stream.avail_out = sizeof(compressed);
} while (ret == Z_OK);