From: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Date: Sun, 8 May 2016 09:47:34 +0000 (+0700) Subject: builtin/worktree.c: use error_errno() X-Git-Tag: v2.9.0-rc0~30^2~27 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/8d19e9309411ca875928b9336ff626b8b6851fcb?hp=17bef17ef8d319e620c19d032c082a18eb88a65f 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> --- 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)