From: Jeff King <peff@peff•net>
To: Junio C Hamano <gitster@pobox•com>
Cc: Patrick Steinhardt <ps@pks•im>, git@vger•kernel.org
Subject: Re: What's cooking in git.git (Sep 2025, #06; Mon, 15)
Date: Tue, 16 Sep 2025 12:49:12 -0400 [thread overview]
Message-ID: <20250916164912.GA15474@coredump.intra.peff.net> (raw)
In-Reply-To: <xmqqzfaunzjo.fsf@gitster.g>
On Tue, Sep 16, 2025 at 09:16:11AM -0700, Junio C Hamano wrote:
> As this makes it necessary for that file to eventually include an
> extra header, it sort of makes sense. I am more wondering if it
> should be a separate commit (i.e. give it a proper log message
> instead of fixup!). If we were to squash, we would need to mention
> why a seemingly unnecessary change is included. "In anticipation of
> another topic that adds a call to function Y, whose definition this
> topic shuffles around and makes it necessary for its callers to
> include header X, we pre-emptively include header X that will become
> needed for the other topic to use function Y when merged with this
> topic". I agree that is certainly awkward.
>
> Adding the extra include to the other topic is not any cleaner. It
> didn't have to include that header to make calls to some functions,
> and it is only because another topic shuffled things around that
> made it necessary. "In anticipation of another topic shuffling
> headers around, we pre-emptively include header X that will become
> needed to use function Y when merged with the other topic" would be
> such an extra commit would say. That may be slightly less awkward
> but it still is so.
I think adding the fix to ps/packfile-store is reasonably clean. It is
subtly depending on a header file having included repository.h, and that
assumption is broken by the other topic. But it was always a slightly
dubious assumption.
That said, it is not really that big an issue and I am fine with any
fix. If you want to document how the history unfolded, then I think an
evil merge shows that (neither topic had a problem on its own, but when
merged we needed to adjust the result). And it is probably the least
amount of work. ;)
-Peff
next prev parent reply other threads:[~2025-09-16 16:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-15 19:19 What's cooking in git.git (Sep 2025, #06; Mon, 15) Junio C Hamano
2025-09-16 6:53 ` Patrick Steinhardt
2025-09-16 16:16 ` Junio C Hamano
2025-09-16 16:49 ` Jeff King [this message]
2025-09-16 17:19 ` Junio C Hamano
2025-09-18 5:52 ` Patrick Steinhardt
2025-09-16 20:54 ` Kristoffer Haugsbakk
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=20250916164912.GA15474@coredump.intra.peff.net \
--to=peff@peff$(echo .)net \
--cc=git@vger$(echo .)kernel.org \
--cc=gitster@pobox$(echo .)com \
--cc=ps@pks$(echo .)im \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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