Message ID | d408cecc85fad1177676c1cb404c0dd0b0a8fbb6.1638514910.git.gitgitgadget@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | c4904377ba98842b68e053e1328ee414f1dbe102 |
Headers | show |
Series | Factorization of messages with similar meaning | expand |
On Fri, Dec 03 2021, Jean-Noël Avila via GitGitGadget wrote: > From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= <jn.avila@free.fr> > > Signed-off-by: Jean-Noël Avila <jn.avila@free.fr> > --- > archive.c | 4 ++-- > builtin/fetch.c | 4 ++-- > 2 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/archive.c b/archive.c > index 10376be7161..f1208beacff 100644 > --- 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)); Re my just-sent comment, i.e. quote things like that, but between this and the first patch there's a bunch that don't use quotes that could use them...
diff --git a/archive.c b/archive.c index 10376be7161..f1208beacff 100644 --- 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, diff --git a/builtin/fetch.c b/builtin/fetch.c index bec3cc7535e..b0d63149388 100644 --- a/builtin/fetch.c +++ b/builtin/fetch.c @@ -995,7 +995,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; @@ -1405,7 +1405,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; }