refs/files: remove useless indirection

The function `files_fsck_refs()` only has a single callsite and forwards all of its arguments as-is, so it's basically a useless indirection. Inline the function call. While at it, also remove the bitwise or that we have for return values. We don't really want to or them at all, but rather just want to return an error in case either of the functions has failed. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Patrick Steinhardt committed Jan 12, 2026 at 10:02 UTC 2fe33ae20fcce7a1e91cfeec37409d511ab8aefb
1 file changed +7 -9
refs/files-backend.c
+7 -9
@@ -3954,22 +3954,20 @@ out:
3954 return ret;
3955 }
3956
3957 -static int files_fsck_refs(struct ref_store *ref_store,
3958 - struct fsck_options *o,
3959 - struct worktree *wt)
3960 -{
3961 - return files_fsck_refs_dir(ref_store, o, wt);
3962 -}
3963 -
3957 static int files_fsck(struct ref_store *ref_store,
3958 struct fsck_options *o,
3959 struct worktree *wt)
3960 {
3961 struct files_ref_store *refs =
3962 files_downcast(ref_store, REF_STORE_READ, "fsck");
3963 + int ret = 0;
3964
3971 - return files_fsck_refs(ref_store, o, wt) |
3972 - refs->packed_ref_store->be->fsck(refs->packed_ref_store, o, wt);
3965 + if (files_fsck_refs_dir(ref_store, o, wt) < 0)
3966 + ret = -1;
3967 + if (refs->packed_ref_store->be->fsck(refs->packed_ref_store, o, wt) < 0)
3968 + ret = -1;
3969 +
3970 + return ret;
3971 }
3972
3973 struct ref_storage_be refs_be_files = {