Subject: Re: [GSoC][PATCH 1/2] refs: setup ref consistency check infrastructure

From: shejialuo <[email-masked]>
Date: Fri, 31 May 2024 23:20:21 +0800

On Fri, May 31, 2024 at 07:23:27AM -0700, Junio C Hamano wrote:
> 
> What is the extra blank line doing there?  It makes reader wonder
> why the .fsck member is somehow very special and different from
> others.  Is there a valid reason to single it out (and no, "yes this
> is special because I invented it" does not count as a valid reason)?
> 
> The same comment applies to a few other places in this patch.

The interfaces defined in the `ref_storage_be` are carefully structured
in semantic. It is organized as the five parts at now:

  1. The name and the initialization interfaces.
  2. The ref transaction interfaces.
  3. The ref internal interfaces (pack, rename and copy).
  4. The ref filesystem interfaces.
  5. The reflog related interfaces.

I firstly thought that we could just add a new function into the ref
internal interfaces part with the name `check_refs_fn`. However, the
ultimate goal is not only to achieve consistency check of refs but also
consistency check of reflogs. So it's not suitable to name this
interface to `check_refs_fn`.

In order to keep consistent with the git-fsck, we decide to name this
interface to `fsck_fn`. This semantic cannot be grouped into any above
five categories in my view. So I deliberately add a blank line to
indicate its independence.