Re: [PATCH v5 4/6] setup: defer object database creation
Toon Claes <[email protected]>
| Newsgroups | org.kernel.vger.git |
|---|---|
| Message-ID | <[email protected]> |
Junio C Hamano <[email protected]> writes: > Patrick Steinhardt <[email protected]> writes: > >> 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. Yeah, I've asked about this. In [PATCH v3 4/6] this change existed: - if (apply_repository_format(repo, &repo_fmt, APPLY_REPOSITORY_FORMAT_HONOR_ENV, &err) < 0) + if (apply_repository_format(repo, &repo_fmt, + APPLY_REPOSITORY_FORMAT_HONOR_ENV | + APPLY_REPOSITORY_FORMAT_SKIP_ODB_CREATION, &err) < 0) But adding APPLY_REPOSITORY_FORMAT_SKIP_ODB_CREATION was reverted in v4, but that version still had the reformatting change (fixing the overly long line). There are multiple occurrences of this overly long line, but only this one was changed in v4. So Patrick reverted changing the overly long line in v5, which I think is better. -- Cheers, Toon