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>
Jeff King committed
Jan 7, 2019 at 03:39 UTC
760113574ff6f503001e2c75b96233b8752cbc37
1 file changed
+3
-3
sha1-file.c
+3
-3
@@ -1552,9 +1552,9 @@ int hash_object_file(const void *buf, unsigned long len, const char *type,
1552
static void close_loose_object(int fd)
1553
{
1554
if (fsync_object_files)
1555
- fsync_or_die(fd, "sha1 file");
1555
+ fsync_or_die(fd, "loose object file");
1556
if (close(fd) != 0)
1557
- die_errno(_("error when closing sha1 file"));
1557
+ die_errno(_("error when closing loose object file"));
1558
}
1559
1560
/* Size of directory component, including the ending '/' */
@@ -1645,7 +1645,7 @@ static int write_loose_object(const struct object_id *oid, char *hdr,
1645
ret = git_deflate(&stream, Z_FINISH);
1646
the_hash_algo->update_fn(&c, in0, stream.next_in - in0);
1647
if (write_buffer(fd, compressed, stream.next_out - compressed) < 0)
1648
- die(_("unable to write sha1 file"));
1648
+ die(_("unable to write loose object file"));
1649
stream.next_out = compressed;
1650
stream.avail_out = sizeof(compressed);
1651
} while (ret == Z_OK);