summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2016-05-08 16:47:34 +0700
committerJunio C Hamano <gitster@pobox.com>2016-05-09 12:29:08 -0700
commit8d19e9309411ca875928b9336ff626b8b6851fcb (patch)
treedcbc030ea7e0b1754048ea1818cfff19df8d1cc7
parent17bef17ef8d319e620c19d032c082a18eb88a65f (diff)
downloadgit-8d19e9309411ca875928b9336ff626b8b6851fcb.tar.gz
builtin/worktree.c: use error_errno()
While at there, improve the error message to say _what_ failed to remove. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--builtin/worktree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/worktree.c b/builtin/worktree.c
index 38b56096bd..df4f6606c1 100644
--- a/builtin/worktree.c
+++ b/builtin/worktree.c
@@ -109,7 +109,7 @@ static void prune_worktrees(void)
if (ret < 0 && errno == ENOTDIR)
ret = unlink(path.buf);
if (ret)
- error(_("failed to remove: %s"), strerror(errno));
+ error_errno(_("failed to remove '%s'"), path.buf);
}
closedir(dir);
if (!show_only)