Subject: Re: [PATCH 04/12] setup: start tracking ref storage format when

From: Junio C Hamano <[email-masked]>
Date: Thu, 28 Dec 2023 09:15:29 -0800

Patrick Steinhardt <[email-masked]> writes:

> Makes me wonder whether we should then also add the following diff to
> "setup: set repository's format on init" when both topics are being
> merged together:
>
> diff --git a/setup.c b/setup.c
> index 3d980814bc..3d35c78c68 100644
> --- a/setup.c
> +++ b/setup.c
> @@ -2210,6 +2210,7 @@ int init_db(const char *git_dir, const char *real_git_dir,
>  	 * format we can update the repository's settings accordingly.
>  	 */
>  	repo_set_hash_algo(the_repository, repo_fmt.hash_algo);
> +	repo_set_compat_hash_algo(the_repository, repo_fmt.compat_hash_algo);
>  	repo_set_ref_storage_format(the_repository, repo_fmt.ref_storage_format);
>  
>  	if (!(flags & INIT_DB_SKIP_REFDB))

Shouldn't that come from the series that wants .compat_hash_algo in
the repo_fmt structure, whichever it is, not added by an evil merge?