Re: [PATCH v2 14/41] builtin/worktree.c: use error_errno()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Nguyễn Thái Ngọc Duy  <pclouds@xxxxxxxxx> writes:

> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx>
> ---
>  builtin/worktree.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/builtin/worktree.c b/builtin/worktree.c
> index d8e3795..331ecf6 100644
> --- a/builtin/worktree.c
> +++ b/builtin/worktree.c
> @@ -110,7 +110,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);

This also deserves a mention in the log message.  We didn't say what
we failed to remove, now we do, which is an improvement.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]