From: Junio C Hamano <gitster@pobox.com>
To: Patrick Steinhardt <ps@pks.im>
Cc: Okhuomon Ajayi <okhuomonajayi54@gmail.com>,
git@vger.kernel.org, christian.couder@gmail.com,
usmanakinyemi202@gmail.com, siddharthasthana31@gmail.com,
kaartic.sivaraam@gmail.com, karthik.188@gmail.com
Subject: Re: [Outreachy PATCH] notes-utils: hide functions that still need the_repository
Date: Thu, 05 Nov 2026 09:56:59 -0800 [thread overview]
Message-ID: <xmqq1p8zw49g.fsf@gitster.g> (raw)
In-Reply-To: <auyRGpaHb5rdVP0d@pks.im> (Patrick Steinhardt's message of "Thu, 5 Nov 2026 15:22:18 +0100")
Patrick Steinhardt <ps@pks.im> writes:
> Hmm. Wouldn't the better course of actions be to instead fix "notes.c"?
> It feels a bit weird to me to just make the whole header a pointless
> include, and we don't do that for other headers, either. We have tons of
> subsystems that still depend on `the_repository`, so what makes
> "notes-utils.h" so special that we need to drop all of its functions?
Because it invites people into removing the_repository from
notes-utils.c and think they are done, when they call helpers from
notes.c liberally if we do not.
> What we indeed do sometimes is to mark some very small subset of
> functions in a header as depending on `the_repository` in case the blast
> radius of fixing all users is simply too big to do it in a single patch
> series.
Absolutely, in the ideal world.
In this case, however, I initialy thought there was only just one or
two functions that depend on the_repository, but it turns out that
everything calls things that only work with the_repository from
notes.c and that is how this patch ended up covering almost all of
this header X-<.
So...
next prev parent reply other threads:[~2026-11-05 17:57 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-31 10:45 [Outreachy PATCH] notes-utils: use the passed repository for notes refs Okhuomon Ajayi
2026-11-02 11:01 ` Patrick Steinhardt
2026-11-02 11:10 ` Okhuomon Ajayi
2026-11-03 8:49 ` [Outreachy PATCH v2 0/2] notes-utils: stop using the_repository Okhuomon Ajayi
2026-11-03 8:49 ` [Outreachy PATCH v2 1/2] notes-utils: use the passed repository for notes refs Okhuomon Ajayi
2026-11-03 9:45 ` Karthik Nayak
2026-11-03 18:01 ` Junio C Hamano
2026-11-05 7:43 ` [Outreachy PATCH] notes-utils: hide functions that still need the_repository Okhuomon Ajayi
2026-11-05 14:22 ` Patrick Steinhardt
2026-11-05 14:47 ` Okhuomon Ajayi
2026-11-05 17:56 ` Junio C Hamano [this message]
2026-11-03 8:49 ` [Outreachy PATCH v2 2/2] notes-utils: pass the repository to init_copy_notes_for_rewrite() Okhuomon Ajayi
2026-11-03 9:48 ` [Outreachy PATCH v2 0/2] notes-utils: stop using the_repository Karthik Nayak
2026-11-03 10:27 ` 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=xmqq1p8zw49g.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=christian.couder@gmail.com \
--cc=git@vger.kernel.org \
--cc=kaartic.sivaraam@gmail.com \
--cc=karthik.188@gmail.com \
--cc=okhuomonajayi54@gmail.com \
--cc=ps@pks.im \
--cc=siddharthasthana31@gmail.com \
--cc=usmanakinyemi202@gmail.com \
/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