Re: [PATCH] stash: show error message when lockfile is present

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

 



On Sun, Nov 07, 2021 at 11:10:17PM -0800, Junio C Hamano wrote:
> I would think the "fix" should look more like this:
>
>  	read_cache_preload(NULL);
> 	if (refresh_and_write_cache(REFRESH_QUIET, 0, 0))
> - 		return -1;
> + 		return error(_("failed to refresh the index"));
>
> That is, tell the function that the caller will do the error
> reporting (i.e. "QUIET") and do so.

Thanks; this is a much better approach. It makes Birk's change much more
direct, and does not require plumbing a new parameter through many
function calls.

Doing something like this (with appropriate tests) would look good to
me.

Thanks,
Taylor



[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]

  Powered by Linux