Re: [PATCH v5 4/6] setup: defer object database creation
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 7, 2026, 04:28 UTC
- Message-ID
- <xmqq1pcah7vg.fsf@gitster.g>
- In-Reply-To
- <20260807-pks-odb-create-on-disk-v5-4-399da0b0b140@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 12 quoted lines
> diff --git a/setup.c b/setup.c
> index 5dfab3e79e..97338cbc51 100644
> --- a/setup.c
> +++ b/setup.c
> @@ -1888,6 +1882,7 @@ const char *enter_repo(struct repository *repo, const char *path, unsigned flags
> read_and_verify_repository_format(&fmt, ".", NULL);
> if (apply_repository_format(repo, &fmt, APPLY_REPOSITORY_FORMAT_HONOR_ENV, &err) < 0)
> die("%s", err.buf);
> + repo->objects = odb_new(repo, ODB_NEW_HONOR_ENV);
> startup_info->have_repository = 1;
>
> clear_repository_format(&fmt);The previous round corrected the overly long line while at it, but it is no longer done here.
Which is OK either way.
Show 5 quoted lines
> @@ -2090,6 +2085,7 @@ const char *setup_git_directory_gently(struct repository *repo, int *nongit_ok)
> if (apply_repository_format(repo, &discovery.format,
> APPLY_REPOSITORY_FORMAT_HONOR_ENV, &err) < 0)
> die("%s", err.buf);
> + repo->objects = odb_new(repo, ODB_NEW_HONOR_ENV);Looks like the differences since the last round is truly minimum ;-)