setup: drop redundant configuration of `startup_info->have_repository`

In `init_db()` we set `startup_info->have_repository` twice: once before reading and applying the repository format and once after. This is redundant though, as configuring the repository format does not rely on this variable at all. Remove the first such site. While at it, fix up formatting a bit. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Patrick Steinhardt committed Jul 7, 2026 at 09:21 UTC eba53f5f5f392d3729f57144e707574bda5d37be
1 file changed +1 -3
setup.c
+1 -3
@@ -2847,12 +2847,10 @@ int init_db(struct repository *repo,
2847 apply_and_export_relative_gitdir(repo, real_git_dir, 1);
2848 git_dir = repo_get_git_dir(repo);
2849 separate_git_dir(git_dir, original_git_dir);
2850 - }
2851 - else {
2850 + } else {
2851 apply_and_export_relative_gitdir(repo, git_dir, 1);
2852 git_dir = repo_get_git_dir(repo);
2853 }
2855 - startup_info->have_repository = 1;
2854
2855 /*
2856 * Check to see if the repository version is right.