wrapper.c: consistently quote filenames in error messages
All other error messages in the file use quotes around the file name. This change removes two translations as "could not write to '%s'" and "could not close '%s'" are already translated and these two are the only occurrences without quotes. Signed-off-by: Simon Ruderich <simon@ruderich.org> [jc: adjusted tests I noticed were broken by the change] Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
cb5918aa0d
commit
0a288d1ee9
@ -688,7 +688,7 @@ test_expect_success 'checking out a commit after submodule removal needs manual
|
|||||||
git submodule update &&
|
git submodule update &&
|
||||||
git checkout -q HEAD^ &&
|
git checkout -q HEAD^ &&
|
||||||
git checkout -q master 2>actual &&
|
git checkout -q master 2>actual &&
|
||||||
test_i18ngrep "^warning: unable to rmdir submod:" actual &&
|
test_i18ngrep "^warning: unable to rmdir '\''submod'\'':" actual &&
|
||||||
git status -s submod >actual &&
|
git status -s submod >actual &&
|
||||||
echo "?? submod/" >expected &&
|
echo "?? submod/" >expected &&
|
||||||
test_cmp expected actual &&
|
test_cmp expected actual &&
|
||||||
|
@ -452,7 +452,7 @@ test_expect_success 'checking out a commit before submodule moved needs manual u
|
|||||||
git mv sub sub2 &&
|
git mv sub sub2 &&
|
||||||
git commit -m "moved sub to sub2" &&
|
git commit -m "moved sub to sub2" &&
|
||||||
git checkout -q HEAD^ 2>actual &&
|
git checkout -q HEAD^ 2>actual &&
|
||||||
test_i18ngrep "^warning: unable to rmdir sub2:" actual &&
|
test_i18ngrep "^warning: unable to rmdir '\''sub2'\'':" actual &&
|
||||||
git status -s sub2 >actual &&
|
git status -s sub2 >actual &&
|
||||||
echo "?? sub2/" >expected &&
|
echo "?? sub2/" >expected &&
|
||||||
test_cmp expected actual &&
|
test_cmp expected actual &&
|
||||||
|
@ -569,7 +569,7 @@ static int warn_if_unremovable(const char *op, const char *file, int rc)
|
|||||||
if (!rc || errno == ENOENT)
|
if (!rc || errno == ENOENT)
|
||||||
return 0;
|
return 0;
|
||||||
err = errno;
|
err = errno;
|
||||||
warning_errno("unable to %s %s", op, file);
|
warning_errno("unable to %s '%s'", op, file);
|
||||||
errno = err;
|
errno = err;
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
@ -583,7 +583,7 @@ int unlink_or_msg(const char *file, struct strbuf *err)
|
|||||||
if (!rc || errno == ENOENT)
|
if (!rc || errno == ENOENT)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
strbuf_addf(err, "unable to unlink %s: %s",
|
strbuf_addf(err, "unable to unlink '%s': %s",
|
||||||
file, strerror(errno));
|
file, strerror(errno));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -653,9 +653,9 @@ void write_file_buf(const char *path, const char *buf, size_t len)
|
|||||||
{
|
{
|
||||||
int fd = xopen(path, O_WRONLY | O_CREAT | O_TRUNC, 0666);
|
int fd = xopen(path, O_WRONLY | O_CREAT | O_TRUNC, 0666);
|
||||||
if (write_in_full(fd, buf, len) < 0)
|
if (write_in_full(fd, buf, len) < 0)
|
||||||
die_errno(_("could not write to %s"), path);
|
die_errno(_("could not write to '%s'"), path);
|
||||||
if (close(fd))
|
if (close(fd))
|
||||||
die_errno(_("could not close %s"), path);
|
die_errno(_("could not close '%s'"), path);
|
||||||
}
|
}
|
||||||
|
|
||||||
void write_file(const char *path, const char *fmt, ...)
|
void write_file(const char *path, const char *fmt, ...)
|
||||||
|
Loading…
Reference in New Issue
Block a user