From: Junio C Hamano <gitster@pobox.com>
To: Patrick Steinhardt <ps@pks.im>
Cc: git@vger.kernel.org
Subject: Re: [PATCH v2 5/6] bundle: get (mostly) rid of `the_repository`
Date: Mon, 17 Aug 2026 09:47:53 -0700 [thread overview]
Message-ID: <xmqqik5866di.fsf@gitster.g> (raw)
In-Reply-To: <20260817-b4-pks-odb-generate-pack-v2-5-4c8a96ccfdb3@pks.im> (Patrick Steinhardt's message of "Mon, 17 Aug 2026 07:39:46 +0200")
Patrick Steinhardt <ps@pks.im> writes:
> Refactor "bundle.c" so that we don't depend on `the_repository` anymore.
> This conversion is trivial for most of the part, as we already have a
> repository available in all calling conexts.
>
> The only exception is that we use `get_log_output_encoding()`, which
> implicitly depends on `the_repository`. Add an `extern` declaration for
> this function so that we can drop `USE_THE_REPOSITORY_VARIABLE` and not
> accidentally introduce more uses of `the_repository`.
>
> Signed-off-by: Patrick Steinhardt <ps@pks.im>
> ---
> bundle.c | 32 +++++++++++++++++++++-----------
> 1 file changed, 21 insertions(+), 11 deletions(-)
>
> diff --git a/bundle.c b/bundle.c
> index b64716f252..a9330bf0d3 100644
> --- a/bundle.c
> +++ b/bundle.c
> @@ -1,4 +1,3 @@
> -#define USE_THE_REPOSITORY_VARIABLE
> #define DISABLE_SIGN_COMPARE_WARNINGS
>
> #include "git-compat-util.h"
> @@ -21,6 +20,13 @@
> #include "connected.h"
> #include "write-or-die.h"
>
> +/*
> + * NEEDSWORK: this function implicitly depends on `the_repository` and is not
> + * available because we dropped USE_THE_REPOSITORY_VARIABLE. We can remove the
> + * declaration once it's accessible via `repo_config_values`.
> + */
> +extern const char *get_log_output_encoding(void);
> +
Doesn't this defeat the whole "drop #define USE_THE_REPOSITORY_VARIABLE
as a mark that we are done with this file and no longer need to
worry about it going forward because we won't be able to compile if
somebody adds a new use?" premise?
We want to omit the above two hunks, even though the rest of the
patch look perfectly good.
Thanks.
next prev parent reply other threads:[~2026-08-17 16:47 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-07 10:45 [PATCH 0/5] odb: make packfile generation pluggable Patrick Steinhardt
2026-08-07 10:45 ` [PATCH 1/5] odb: introduce interface to generate packfiles Patrick Steinhardt
2026-08-07 10:45 ` [PATCH 2/5] upload-pack: generate packfiles via the object database Patrick Steinhardt
2026-08-07 10:45 ` [PATCH 3/5] send-pack: " Patrick Steinhardt
2026-08-07 10:45 ` [PATCH 4/5] builtin/bundle: refactor option handling for progress meter Patrick Steinhardt
2026-08-07 10:45 ` [PATCH 5/5] bundle: generate packfiles via the object database Patrick Steinhardt
2026-08-13 18:00 ` Junio C Hamano
2026-08-14 7:40 ` Patrick Steinhardt
2026-08-07 21:05 ` [PATCH 0/5] odb: make packfile generation pluggable Junio C Hamano
2026-08-10 5:25 ` Patrick Steinhardt
2026-08-12 23:41 ` Taylor Blau
[not found] ` <an1ajMjVRUsfu-lv@pks.im>
2026-08-13 17:35 ` Junio C Hamano
2026-08-17 5:39 ` [PATCH v2 0/6] " Patrick Steinhardt
2026-08-17 5:39 ` [PATCH v2 1/6] odb: introduce interface to generate packfiles Patrick Steinhardt
2026-08-17 5:39 ` [PATCH v2 2/6] upload-pack: generate packfiles via the object database Patrick Steinhardt
2026-08-17 5:39 ` [PATCH v2 3/6] send-pack: " Patrick Steinhardt
2026-08-17 5:39 ` [PATCH v2 4/6] builtin/bundle: refactor option handling for progress meter Patrick Steinhardt
2026-08-17 5:39 ` [PATCH v2 5/6] bundle: get (mostly) rid of `the_repository` Patrick Steinhardt
2026-08-17 16:47 ` Junio C Hamano [this message]
2026-08-17 5:39 ` [PATCH v2 6/6] bundle: generate packfiles via the object database 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=xmqqik5866di.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox