From: Junio C Hamano Date: Thu, 29 Oct 2026 16:19:17 GMT Subject: Re: [Outreachy PATCH v2] range-diff: use diffopt->repo instead of the_repository Message-ID: In-Reply-To: <20261029084720.93221-1-okhuomonajayi54@gmail.com> Okhuomon Ajayi 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 > --- > 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.