i18n: standardize "cannot open" and "cannot read"
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>
Jean-Noël Avila committed
Jan 5, 2022 at 20:02 UTC
c4904377ba98842b68e053e1328ee414f1dbe102
2 files changed
+4
-4
archive.c
+2
-2
@@ -185,7 +185,7 @@ static int write_archive_entry(const struct object_id *oid, const char *base,
185
186
buffer = object_file_to_archive(args, path.buf, oid, mode, &type, &size);
187
if (!buffer)
188
- return error(_("cannot read %s"), oid_to_hex(oid));
188
+ return error(_("cannot read '%s'"), oid_to_hex(oid));
189
err = write_entry(args, oid, path.buf, path.len, mode, buffer, size);
190
free(buffer);
191
return err;
@@ -338,7 +338,7 @@ int write_archive_entries(struct archiver_args *args,
338
339
strbuf_reset(&content);
340
if (strbuf_read_file(&content, path, info->stat.st_size) < 0)
341
- err = error_errno(_("could not read '%s'"), path);
341
+ err = error_errno(_("cannot read '%s'"), path);
342
else
343
err = write_entry(args, &fake_oid, path_in_archive.buf,
344
path_in_archive.len,
builtin/fetch.c
+2
-2
@@ -996,7 +996,7 @@ static int open_fetch_head(struct fetch_head *fetch_head)
996
if (write_fetch_head) {
997
fetch_head->fp = fopen(filename, "a");
998
if (!fetch_head->fp)
999
- return error_errno(_("cannot open %s"), filename);
999
+ return error_errno(_("cannot open '%s'"), filename);
1000
strbuf_init(&fetch_head->buf, 0);
1001
} else {
1002
fetch_head->fp = NULL;
@@ -1408,7 +1408,7 @@ static int truncate_fetch_head(void)
1408
FILE *fp = fopen_for_writing(filename);
1409
1410
if (!fp)
1411
- return error_errno(_("cannot open %s"), filename);
1411
+ return error_errno(_("cannot open '%s'"), filename);
1412
fclose(fp);
1413
return 0;
1414
}