Skip to content

Commit c490437

Browse files
jnavilagitster
authored andcommitted
i18n: standardize "cannot open" and "cannot read"
Signed-off-by: Jean-Noël Avila <[email protected]> Reviewed-by: Johannes Sixt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 12909b6 commit c490437

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

archive.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ static int write_archive_entry(const struct object_id *oid, const char *base,
185185

186186
buffer = object_file_to_archive(args, path.buf, oid, mode, &type, &size);
187187
if (!buffer)
188-
return error(_("cannot read %s"), oid_to_hex(oid));
188+
return error(_("cannot read '%s'"), oid_to_hex(oid));
189189
err = write_entry(args, oid, path.buf, path.len, mode, buffer, size);
190190
free(buffer);
191191
return err;
@@ -338,7 +338,7 @@ int write_archive_entries(struct archiver_args *args,
338338

339339
strbuf_reset(&content);
340340
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);
342342
else
343343
err = write_entry(args, &fake_oid, path_in_archive.buf,
344344
path_in_archive.len,

builtin/fetch.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -996,7 +996,7 @@ static int open_fetch_head(struct fetch_head *fetch_head)
996996
if (write_fetch_head) {
997997
fetch_head->fp = fopen(filename, "a");
998998
if (!fetch_head->fp)
999-
return error_errno(_("cannot open %s"), filename);
999+
return error_errno(_("cannot open '%s'"), filename);
10001000
strbuf_init(&fetch_head->buf, 0);
10011001
} else {
10021002
fetch_head->fp = NULL;
@@ -1408,7 +1408,7 @@ static int truncate_fetch_head(void)
14081408
FILE *fp = fopen_for_writing(filename);
14091409

14101410
if (!fp)
1411-
return error_errno(_("cannot open %s"), filename);
1411+
return error_errno(_("cannot open '%s'"), filename);
14121412
fclose(fp);
14131413
return 0;
14141414
}

0 commit comments

Comments
 (0)