Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Okhuomon Ajayi <okhuomonajayi54@gmail.com>
Cc: git@vger.kernel.org,  pabloosabaterr@gmail.com,
	christian.couder@gmail.com,  usmanakinyemi202@gmail.com,
	siddharthasthana31@gmail.com,  kaartic.sivaraam@gmail.com
Subject: Re: [Outreachy PATCH v2] range-diff: use diffopt->repo instead of the_repository
Date: Thu, 29 Oct 2026 09:19:17 -0700	[thread overview]
Message-ID: <xmqqzevw4gze.fsf@gitster.g> (raw)
In-Reply-To: <20261029084720.93221-1-okhuomonajayi54@gmail.com> (Okhuomon Ajayi's message of "Thu, 29 Oct 2026 09:47:20 +0100")

Okhuomon Ajayi <okhuomonajayi54@gmail.com> writes:

> output_pair_header() and patch_diff() receive a diffopt whose repo
> field names the repository to work on, yet they abbreviate object
> names and look up commits in the_repository. get_filespec(), called
> from patch_diff(), also uses the_hash_algo, which is the hash
> algorithm of the_repository. If a caller set up diffopt for another
> repository, these functions would still read from the global one.
>
> Use diffopt->repo in output_pair_header(), and add a hash algorithm
> parameter to get_filespec() so that patch_diff() can pass
> diffopt->repo->hash_algo.
>
> Keep USE_THE_REPOSITORY_VARIABLE because read_patches(), output() and
> is_range_diff_range() still use the_repository.
>
> Signed-off-by: Okhuomon Ajayi <okhuomonajayi54@gmail.com>
> ---
> Changes since v1:
> - Reworded the commit message as suggested by Pablo. No code was
>   changed.
>
> Thanks, Pablo, for the review.

OK, well written.  Except for the "In-reply-to:" header that should
point at your earlier iteration of the patch (not a review message
your earlier iteration received), everything I see here looks good.

Will queue.

      reply	other threads:[~2026-10-29 16:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-28 21:51 [Outreachy PATCH] range-diff: use the repository from the diff options Okhuomon Ajayi
2026-10-29  1:02 ` Pablo Sabater
2026-10-29  8:47   ` [Outreachy PATCH v2] range-diff: use diffopt->repo instead of the_repository Okhuomon Ajayi
2026-10-29 16:19     ` Junio C Hamano [this message]

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=xmqqzevw4gze.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=kaartic.sivaraam@gmail.com \
    --cc=okhuomonajayi54@gmail.com \
    --cc=pabloosabaterr@gmail.com \
    --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