From: Junio C Hamano <gitster@pobox.com>
To: Patrick Steinhardt <ps@pks.im>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 12/13] odb: handle changing a repository's commondir
Date: Thu, 20 Nov 2025 14:06:15 -0800 [thread overview]
Message-ID: <xmqq34687414.fsf@gitster.g> (raw)
In-Reply-To: <20251119-b4-pks-odb-creation-v1-12-2b2ed2612cb6@pks.im> (Patrick Steinhardt's message of "Wed, 19 Nov 2025 08:51:00 +0100")
Patrick Steinhardt <ps@pks.im> writes:
> -static void set_git_dir_1(const char *path)
> +static void setup_git_env_internal(const char *git_dir,
> + bool skip_initializing_odb)
> +{
Hopefully we won't gain too many callers of this function, and ...
> +static void set_git_dir_1(const char *path, bool skip_initializing_odb)
> {
... this function, as ...
> - set_git_dir_1(path);
> + set_git_dir_1(path, true);
> ...
> - set_git_dir_1(path);
> + set_git_dir_1(path, false);
... it is almost impossible to tell from the call site which one is
for initializing the ODB (hint: "true" does initialize the ODB, oh,
no it is the other way around, or is it correct? now everybody is
confused).
We could do "enum { INIT_DB, NO_INIT_DB }" instead of bool and the
calling sites would become self-describing, but as long as we won't
have too many calling sites, the current code should be OK.
next prev parent reply other threads:[~2025-11-20 22:06 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-19 7:50 [PATCH 00/13] Centralize management of object database sources Patrick Steinhardt
2025-11-19 7:50 ` [PATCH 01/13] path: move `enter_repo()` into "setup.c" Patrick Steinhardt
2025-11-19 7:50 ` [PATCH 02/13] setup: convert `set_git_dir()` to have file scope Patrick Steinhardt
2025-11-19 7:50 ` [PATCH 03/13] odb: adopt logic to close object databases Patrick Steinhardt
2025-11-19 7:50 ` [PATCH 04/13] odb: refactor `odb_clear()` to `odb_free()` Patrick Steinhardt
2025-11-19 7:50 ` [PATCH 05/13] odb: move logic to disable ref updates into repo Patrick Steinhardt
2025-11-19 20:51 ` Junio C Hamano
2025-11-21 7:48 ` Patrick Steinhardt
2025-11-19 7:50 ` [PATCH 06/13] oidset: introduce `oidset_equal()` Patrick Steinhardt
2025-11-19 20:59 ` Junio C Hamano
2025-11-19 7:50 ` [PATCH 07/13] builtin/index-pack: fix deferred fsck outside repos Patrick Steinhardt
2025-11-19 21:27 ` Junio C Hamano
2025-11-21 7:48 ` Patrick Steinhardt
2025-11-19 7:50 ` [PATCH 08/13] t/helper: stop setting up `the_repository` repeatedly Patrick Steinhardt
2025-11-19 7:50 ` [PATCH 09/13] http-push: stop setting up `the_repository` for each reference Patrick Steinhardt
2025-11-19 7:50 ` [PATCH 10/13] odb: handle initialization of sources in `odb_new()` Patrick Steinhardt
2025-11-19 7:50 ` [PATCH 11/13] chdir-notify: add function to unregister listeners Patrick Steinhardt
2025-11-19 7:51 ` [PATCH 12/13] odb: handle changing a repository's commondir Patrick Steinhardt
2025-11-20 22:06 ` Junio C Hamano [this message]
2025-11-21 8:12 ` Patrick Steinhardt
2025-11-19 7:51 ` [PATCH 13/13] odb: handle recreation of quarantine directories Patrick Steinhardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqq34687414.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=ps@pks.im \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.