* [Outreachy PATCH] notes-utils: use the passed repository for notes refs
@ 2026-10-31 10:45 Okhuomon Ajayi
2026-11-02 11:01 ` Patrick Steinhardt
0 siblings, 1 reply; 3+ messages in thread
From: Okhuomon Ajayi @ 2026-10-31 10:45 UTC (permalink / raw)
To: git
Cc: christian.couder, usmanakinyemi202, siddharthasthana31,
kaartic.sivaraam, Okhuomon Ajayi
create_notes_commit() and commit_notes() receive a repository,
but read and update the notes ref in the_repository.
Use the repository they are given.
Keep USE_THE_REPOSITORY_VARIABLE because
init_copy_notes_for_rewrite() still uses the_repository.
Signed-off-by: Okhuomon Ajayi <okhuomonajayi54@gmail.com>
---
notes-utils.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/notes-utils.c b/notes-utils.c
index 5c1c75d5b8..d4606bc576 100644
--- a/notes-utils.c
+++ b/notes-utils.c
@@ -26,7 +26,7 @@ void create_notes_commit(struct repository *r,
if (!parents) {
/* Deduce parent commit from t->ref */
struct object_id parent_oid;
- if (!refs_read_ref(get_main_ref_store(the_repository), t->ref, &parent_oid)) {
+ if (!refs_read_ref(get_main_ref_store(r), t->ref, &parent_oid)) {
struct commit *parent = lookup_commit(r, &parent_oid);
if (repo_parse_commit(r, parent))
die("Failed to find/parse commit %s", t->ref);
@@ -61,7 +61,7 @@ void commit_notes(struct repository *r, struct notes_tree *t, const char *msg)
create_notes_commit(r, t, NULL, buf.buf, buf.len, &commit_oid);
strbuf_insertstr(&buf, 0, "notes: ");
- refs_update_ref(get_main_ref_store(the_repository), buf.buf,
+ refs_update_ref(get_main_ref_store(r), buf.buf,
t->update_ref, &commit_oid, NULL, 0,
UPDATE_REFS_DIE_ON_ERR);
base-commit: 50fe5cc63f9cd6e89b87a2c9ccf96a444f4cfdb7
--
2.56.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Outreachy PATCH] notes-utils: use the passed repository for notes refs
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
0 siblings, 1 reply; 3+ messages in thread
From: Patrick Steinhardt @ 2026-11-02 11:01 UTC (permalink / raw)
To: Okhuomon Ajayi
Cc: git, christian.couder, usmanakinyemi202, siddharthasthana31,
kaartic.sivaraam
On Sat, Oct 31, 2026 at 11:45:26AM +0100, Okhuomon Ajayi wrote:
> create_notes_commit() and commit_notes() receive a repository,
> but read and update the notes ref in the_repository.
>
> Use the repository they are given.
>
> Keep USE_THE_REPOSITORY_VARIABLE because
> init_copy_notes_for_rewrite() still uses the_repository.
I don't quite understand patches like this. They are _so_ close to
getting rid of `USE_THE_REPOSITORY_VARIABLE`, but then they just skip on
the final change that would make them work. I've already asked about
this on one of your preceding patches.
Also, could you maybe reduce the frequency a bit with which you send new
topics? There's a ton of in-flight patch series by you in this vicinity,
and it gets a bit overwhelming. May I ask you to maybe batch related
patches into bigger series (maybe 5-10 commits) so that the reviewer can
focus on way fewer patch series overall, and then have less series in
flight at the same point in time?
Thanks!
Patrick
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Outreachy PATCH] notes-utils: use the passed repository for notes refs
2026-11-02 11:01 ` Patrick Steinhardt
@ 2026-11-02 11:10 ` Okhuomon Ajayi
0 siblings, 0 replies; 3+ messages in thread
From: Okhuomon Ajayi @ 2026-11-02 11:10 UTC (permalink / raw)
To: Patrick Steinhardt
Cc: git, christian.couder, usmanakinyemi202, siddharthasthana31,
kaartic.sivaraam
On Mon, Nov 2, 2026 at 12:01 PM Patrick Steinhardt <ps@pks.im> wrote:
> I don't quite understand patches like this. They are _so_ close to
> getting rid of `USE_THE_REPOSITORY_VARIABLE`, but then they just skip on
> the final change that would make them work. I've already asked about
> this on one of your preceding patches.
Thanks, Patrick. You're right, I should have gone the full way here
after your comment on bundle-uri.
I'll send a v2 that also passes the repository to
init_copy_notes_for_rewrite() and updates its callers, so that
notes-utils.c can drop USE_THE_REPOSITORY_VARIABLE.
> Also, could you maybe reduce the frequency a bit with which you send new
> topics? There's a ton of in-flight patch series by you in this vicinity,
> and it gets a bit overwhelming. May I ask you to maybe batch related
> patches into bigger series (maybe 5-10 commits) so that the reviewer can
> focus on way fewer patch series overall, and then have less series in
> flight at the same point in time?
Sorry about that. I'll stop sending new topics for now, and batch
related conversions into one series from now on.
Thanks,
Okhuomon
On Mon, Nov 2, 2026 at 12:01 PM Patrick Steinhardt <ps@pks.im> wrote:
>
> On Sat, Oct 31, 2026 at 11:45:26AM +0100, Okhuomon Ajayi wrote:
> > create_notes_commit() and commit_notes() receive a repository,
> > but read and update the notes ref in the_repository.
> >
> > Use the repository they are given.
> >
> > Keep USE_THE_REPOSITORY_VARIABLE because
> > init_copy_notes_for_rewrite() still uses the_repository.
>
> I don't quite understand patches like this. They are _so_ close to
> getting rid of `USE_THE_REPOSITORY_VARIABLE`, but then they just skip on
> the final change that would make them work. I've already asked about
> this on one of your preceding patches.
>
> Also, could you maybe reduce the frequency a bit with which you send new
> topics? There's a ton of in-flight patch series by you in this vicinity,
> and it gets a bit overwhelming. May I ask you to maybe batch related
> patches into bigger series (maybe 5-10 commits) so that the reviewer can
> focus on way fewer patch series overall, and then have less series in
> flight at the same point in time?
>
> Thanks!
>
> Patrick
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-11-02 11:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox