builtin/rm.c: use warning_errno()
While at there, improve the message a bit (what operation failed?) and mark it for translation since the format string is now a sentence. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Nguyễn Thái Ngọc Duy committed
May 8, 2016 at 16:47 UTC
7dcf3d97fa6098382828551de8f91ad8b23d5a4c
1 file changed
+1
-1
builtin/rm.c
+1
-1
@@ -152,7 +152,7 @@ static int check_local_mod(unsigned char *head, int index_only)
152
153
if (lstat(ce->name, &st) < 0) {
154
if (errno != ENOENT && errno != ENOTDIR)
155
- warning("'%s': %s", ce->name, strerror(errno));
155
+ warning_errno(_("failed to stat '%s'"), ce->name);
156
/* It already vanished from the working tree */
157
continue;
158
}