{"thread":{"id":"66656","subject":"[Outreachy PATCH] diffcore-rename: stop using the_repository","startedAt":"2026-10-24T22:13:41Z","lastAt":"2026-10-26T11:58:09Z","messageCount":5,"participants":["Okhuomon Ajayi","Patrick Steinhardt"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"556195","messageId":"20261024221341.92086-1-okhuomonajayi54@gmail.com","threadId":"66656","inReplyTo":null,"subject":"[Outreachy PATCH] diffcore-rename: stop using the_repository","fromName":"Okhuomon Ajayi","fromEmail":"okhuomonajayi54@gmail.com","sentAt":"2026-10-24T22:13:41Z","receivedAt":"2026-10-24T22:13:41Z","isPatch":true,"sender":{"key":"okhuomonajayi54@gmail.com","avatar":null},"body":"diffcore_rename_extended() already has the repository through\noptions. Use its hash algorithm when checking for empty blobs,\nand pass it to start_delayed_progress().\n\nRemove the USE_THE_REPOSITORY_VARIABLE definition.\n\nSigned-off-by: Okhuomon Ajayi <okhuomonajayi54@gmail.com>\n---\n diffcore-rename.c | 10 +++++-----\n 1 file changed, 5 insertions(+), 5 deletions(-)\n\ndiff --git a/diffcore-rename.c b/diffcore-rename.c\nindex c797d8ed2f..f0ce6e14e5 100644\n--- a/diffcore-rename.c\n+++ b/diffcore-rename.c\n@@ -3,8 +3,6 @@\n  * Copyright (C) 2005 Junio C Hamano\n  */\n \n-#define USE_THE_REPOSITORY_VARIABLE\n-\n #include \"git-compat-util.h\"\n #include \"diff.h\"\n #include \"diffcore.h\"\n@@ -1424,7 +1422,8 @@ void diffcore_rename_extended(struct diff_options *options,\n \t\t\t\t strcmp(options->single_follow, p->two->path))\n \t\t\t\tcontinue; /* not interested */\n \t\t\telse if (!options->flags.rename_empty &&\n-\t\t\t\t is_empty_blob_oid(&p->two->oid, the_repository->hash_algo))\n+\t\t\t\t is_empty_blob_oid(&p->two->oid,\n+\t\t\t\t\t\t   options->repo->hash_algo))\n \t\t\t\tcontinue;\n \t\t\telse if (add_rename_dst(p) < 0) {\n \t\t\t\twarning(\"skipping rename detection, detected\"\n@@ -1434,7 +1433,8 @@ void diffcore_rename_extended(struct diff_options *options,\n \t\t\t}\n \t\t}\n \t\telse if (!options->flags.rename_empty &&\n-\t\t\t is_empty_blob_oid(&p->one->oid, the_repository->hash_algo))\n+\t\t\t is_empty_blob_oid(&p->one->oid,\n+\t\t\t\t\t   options->repo->hash_algo))\n \t\t\tcontinue;\n \t\telse if (!DIFF_PAIR_UNMERGED(p) && !DIFF_FILE_VALID(p->two)) {\n \t\t\t/*\n@@ -1567,7 +1567,7 @@ void diffcore_rename_extended(struct diff_options *options,\n \ttrace2_region_enter(\"diff\", \"inexact renames\", options->repo);\n \tif (options->show_rename_progress) {\n \t\tprogress = start_delayed_progress(\n-\t\t\t\tthe_repository,\n+\t\t\t\toptions->repo,\n \t\t\t\t_(\"Performing inexact rename detection\"),\n \t\t\t\t(uint64_t)num_destinations * (uint64_t)num_sources);\n \t}\n\nbase-commit: 7e34d8174dcda3435d1404c9a30bef46afe6c13e\n-- \n2.56.0\n\n\n"},{"id":"556306","messageId":"at8w9u6qA1dhmw3r@pks.im","threadId":"66656","inReplyTo":"20261024221341.92086-1-okhuomonajayi54@gmail.com","subject":"Re: [Outreachy PATCH] diffcore-rename: stop using the_repository","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-10-26T10:52:38Z","receivedAt":"2026-10-26T10:52:38Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"On Sat, Oct 24, 2026 at 11:13:41PM +0100, Okhuomon Ajayi wrote:\n> diffcore_rename_extended() already has the repository through\n> options. Use its hash algorithm when checking for empty blobs,\n> and pass it to start_delayed_progress().\n> \n> Remove the USE_THE_REPOSITORY_VARIABLE definition.\n\nAll of the conversions are trivial, and we already dereference\n`options->repo` unconditionally in this function. So the patch looks\ntrivially correct to me, nice!\n\nPatrick\n\n"},{"id":"556316","messageId":"CAFpMFfDaVf47QKkNROJAHJB7oJR+iPt5gkkCnj4KdZW_9MRqGQ@mail.gmail.com","threadId":"66656","inReplyTo":"at8w9u6qA1dhmw3r@pks.im","subject":"Re: [Outreachy PATCH] diffcore-rename: stop using the_repository","fromName":"Okhuomon Ajayi","fromEmail":"okhuomonajayi54@gmail.com","sentAt":"2026-10-26T11:22:59Z","receivedAt":"2026-10-26T11:22:59Z","isPatch":true,"sender":{"key":"okhuomonajayi54@gmail.com","avatar":null},"body":"Thanks for the review, Patrick!\n\nOn Mon, Oct 26, 2026 at 11:52 AM Patrick Steinhardt <ps@pks.im> wrote:\n>\n> On Sat, Oct 24, 2026 at 11:13:41PM +0100, Okhuomon Ajayi wrote:\n> > diffcore_rename_extended() already has the repository through\n> > options. Use its hash algorithm when checking for empty blobs,\n> > and pass it to start_delayed_progress().\n> >\n> > Remove the USE_THE_REPOSITORY_VARIABLE definition.\n>\n> All of the conversions are trivial, and we already dereference\n> `options->repo` unconditionally in this function. So the patch looks\n> trivially correct to me, nice!\n>\n> Patrick\n\n"},{"id":"556325","messageId":"at8_ebX7cYMrlhU9@pks.im","threadId":"66656","inReplyTo":"CAFpMFfDaVf47QKkNROJAHJB7oJR+iPt5gkkCnj4KdZW_9MRqGQ@mail.gmail.com","subject":"Re: [Outreachy PATCH] diffcore-rename: stop using the_repository","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-10-26T11:54:33Z","receivedAt":"2026-10-26T11:54:33Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"On Mon, Oct 26, 2026 at 12:22:59PM +0100, Okhuomon Ajayi wrote:\n> Thanks for the review, Patrick!\n\nNit: please don't top-post, the expectation is to write your answer\nbelow the parts you respond to. Thanks!\n\nPatrick\n\n> On Mon, Oct 26, 2026 at 11:52 AM Patrick Steinhardt <ps@pks.im> wrote:\n> >\n> > On Sat, Oct 24, 2026 at 11:13:41PM +0100, Okhuomon Ajayi wrote:\n> > > diffcore_rename_extended() already has the repository through\n> > > options. Use its hash algorithm when checking for empty blobs,\n> > > and pass it to start_delayed_progress().\n> > >\n> > > Remove the USE_THE_REPOSITORY_VARIABLE definition.\n> >\n> > All of the conversions are trivial, and we already dereference\n> > `options->repo` unconditionally in this function. So the patch looks\n> > trivially correct to me, nice!\n> >\n> > Patrick\n\n"},{"id":"556326","messageId":"CAFpMFfDX9QiEnO3asWMREXmE2etYuk_NvgqmfgNUzP4cYQRMDg@mail.gmail.com","threadId":"66656","inReplyTo":"at8_ebX7cYMrlhU9@pks.im","subject":"Re: [Outreachy PATCH] diffcore-rename: stop using the_repository","fromName":"Okhuomon Ajayi","fromEmail":"okhuomonajayi54@gmail.com","sentAt":"2026-10-26T11:58:09Z","receivedAt":"2026-10-26T11:58:09Z","isPatch":true,"sender":{"key":"okhuomonajayi54@gmail.com","avatar":null},"body":"> Nit: please don't top-post, the expectation is to write your answer\n> below the parts you respond to. Thanks!\n\n\n My bad i am sorry i forgot ;_;\n\n"}]}