Re: [PATCH v5 3/9] ref: port git-fsck(1) regular refs check for files backend
- From
Karthik Nayak <karthik.188@gmail.com>
- Date
- Oct 8, 2024, 07:43 UTC
- Message-ID
- <CAOLa=ZQ3Gytt4Lsttxws3DWqbjteJS8mXvZSPzDwBJi_ALS03Q@mail.gmail.com>
- In-Reply-To
- <Zvj-osCNDMrUQv83@ArchLinux>
shejialuo <shejialuo@gmail.com> writes:
[snip]
Show 7 quoted lines
> + if (strbuf_read_file(&ref_content, iter->path.buf, 0) < 0) {
> + ret = fsck_report_ref(o, &report,
> + FSCK_MSG_BAD_REF_CONTENT,
> + "cannot read ref file");
> + goto cleanup;
> + }
> +Shouldn't we use `die_errno` here instead? I mean, this is not really a bad ref content issue. If we don't want to die here, it would still probably be nice to get the actual issue using `strerror` instead and use that instead of the generic message we have here.
[snip]