]> git.ipfire.org Git - thirdparty/git.git/commitdiff
i18n: standardize "cannot open" and "cannot read"
authorJean-Noël Avila <jn.avila@free.fr>
Wed, 5 Jan 2022 20:02:17 +0000 (20:02 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 5 Jan 2022 21:29:23 +0000 (13:29 -0800)
Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
Reviewed-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
archive.c
builtin/fetch.c

index e85ba169088e10f1a44b68d36f87763995be1a9a..78d354670083d6e458ae9a6b64b3517661227468 100644 (file)
--- a/archive.c
+++ b/archive.c
@@ -185,7 +185,7 @@ static int write_archive_entry(const struct object_id *oid, const char *base,
 
        buffer = object_file_to_archive(args, path.buf, oid, mode, &type, &size);
        if (!buffer)
-               return error(_("cannot read %s"), oid_to_hex(oid));
+               return error(_("cannot read '%s'"), oid_to_hex(oid));
        err = write_entry(args, oid, path.buf, path.len, mode, buffer, size);
        free(buffer);
        return err;
@@ -338,7 +338,7 @@ int write_archive_entries(struct archiver_args *args,
 
                strbuf_reset(&content);
                if (strbuf_read_file(&content, path, info->stat.st_size) < 0)
-                       err = error_errno(_("could not read '%s'"), path);
+                       err = error_errno(_("cannot read '%s'"), path);
                else
                        err = write_entry(args, &fake_oid, path_in_archive.buf,
                                          path_in_archive.len,
index 2c584c85812a54b43d950c61a46fd91b0d30df96..c0855c363fd963574ebc6b8ddb8db8be597d63e9 100644 (file)
@@ -996,7 +996,7 @@ static int open_fetch_head(struct fetch_head *fetch_head)
        if (write_fetch_head) {
                fetch_head->fp = fopen(filename, "a");
                if (!fetch_head->fp)
-                       return error_errno(_("cannot open %s"), filename);
+                       return error_errno(_("cannot open '%s'"), filename);
                strbuf_init(&fetch_head->buf, 0);
        } else {
                fetch_head->fp = NULL;
@@ -1408,7 +1408,7 @@ static int truncate_fetch_head(void)
        FILE *fp = fopen_for_writing(filename);
 
        if (!fp)
-               return error_errno(_("cannot open %s"), filename);
+               return error_errno(_("cannot open '%s'"), filename);
        fclose(fp);
        return 0;
 }