Re: [PATCH v8 5/9] ref: port git-fsck(1) regular refs check for files backend
On Fri, Nov 15, 2024 at 12:54:28AM +0800, shejialuo wrote:
> + if (strbuf_read_file(&ref_content, iter->path.buf, 0) < 0 ) {Nit: there's a space too much here now.
Show 11 quoted lines
> + /*
> + * Ref file could be removed by another concurrent process. We should
> + * ignore this error and continue to the next ref.
> + */
> + if (errno == ENOENT)
> + goto cleanup;
> +
> + ret = error_errno(_("cannot read ref file '%s': %s"),
> + iter->path.buf, strerror(errno));
> + goto cleanup;
> + }You report `errno` twice. This should be:
ret = error_errno(_("cannot read ref file '%s'"), iter->path.buf);Other than that this version looks good to me, thanks!
Patrick