Re: [GSoC][PATCH 1/2] refs: setup ref consistency check infrastructure
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 31, 2024, 14:23 UTC
- Message-ID
- <xmqqfrtyjc0w.fsf@gitster.g>
- In-Reply-To
- <20240530122753.1114818-2-shejialuo@gmail.com>
shejialuo <shejialuo@gmail.com> writes:
Show 24 quoted lines
> diff --git a/refs/files-backend.c b/refs/files-backend.c
> index 5f3089d947..b6147c588b 100644
> --- a/refs/files-backend.c
> +++ b/refs/files-backend.c
> @@ -3299,6 +3299,11 @@ static int files_init_db(struct ref_store *ref_store,
> return 0;
> }
>
> +static int files_fsck(struct ref_store *ref_store)
> +{
> + return 0;
> +}
> +
> struct ref_storage_be refs_be_files = {
> .name = "files",
> .init = files_ref_store_create,
> @@ -3322,5 +3327,7 @@ struct ref_storage_be refs_be_files = {
> .reflog_exists = files_reflog_exists,
> .create_reflog = files_create_reflog,
> .delete_reflog = files_delete_reflog,
> - .reflog_expire = files_reflog_expire
> + .reflog_expire = files_reflog_expire,
> +
> + .fsck = files_fsck,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.