Thread (1 message) 1 message, 1 author, 2026-02-20

Re: [PATCH] tree-diff: remove the usage of the_hash_algo global

From: Junio C Hamano <hidden>
Date: 2026-02-20 20:21:32

Shreyansh Paliwal [off-list ref] writes:
emit_path() uses the global the_hash_algo even though a local repository is
already available via struct diff_options *opt.

Replace these uses with opt->repo->hash_algo. With no remaining reliance on
global states in this file, drop the dependency on 'environment.h' and remove
'#define USE_THE_REPOSITORY_VARIABLE'.

This follows earlier cleanups to introduce opt->repo in tree-diff.c [1][2].

[1]- https://lore.kernel.org/git/20180921155739.14407-21-pclouds@gmail.com/ (local)
[2]- https://lore.kernel.org/git/20260109213021.2546-2-l.s.r@web.de/ (local)

Signed-off-by: Shreyansh Paliwal <redacted>
---
 tree-diff.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
Nice.  Will queue.  Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help