aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2026-03-04 10:53:00 -0800
committerJunio C Hamano <gitster@pobox.com>2026-03-04 10:53:00 -0800
commit8f760e7e8b67c067b829d81a9f32fb7c3fbcd6b9 (patch)
treeff19e88cc7803b9fd32d765dbe1bebc9b72798e0
parent7b7d67104e315437c46e62986e163c97c5a51dd3 (diff)
parent1e50d839f8592daf364778298a61670c4b998654 (diff)
downloadgit-8f760e7e8b67c067b829d81a9f32fb7c3fbcd6b9.tar.xz
Merge branch 'sp/tree-diff-wo-the-repository'
The last uses of the_repository in "tree-diff.c" have been eradicated. * sp/tree-diff-wo-the-repository: tree-diff: remove the usage of the_hash_algo global
-rw-r--r--tree-diff.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/tree-diff.c b/tree-diff.c
index 631ea86812..2f5c956d02 100644
--- a/tree-diff.c
+++ b/tree-diff.c
@@ -2,7 +2,6 @@
* Helper functions for tree diff generation
*/
-#define USE_THE_REPOSITORY_VARIABLE
#define DISABLE_SIGN_COMPARE_WARNINGS
#include "git-compat-util.h"
@@ -11,7 +10,6 @@
#include "hash.h"
#include "tree.h"
#include "tree-walk.h"
-#include "environment.h"
#include "repository.h"
#include "dir.h"
@@ -253,7 +251,7 @@ static void emit_path(struct combine_diff_path ***tail,
strbuf_add(base, path, pathlen);
p = combine_diff_path_new(base->buf, base->len, mode,
- oid ? oid : null_oid(the_hash_algo),
+ oid ? oid : null_oid(opt->repo->hash_algo),
nparent);
strbuf_setlen(base, old_baselen);
@@ -278,7 +276,7 @@ static void emit_path(struct combine_diff_path ***tail,
mode_i = tp[i].entry.mode;
}
else {
- oid_i = null_oid(the_hash_algo);
+ oid_i = null_oid(opt->repo->hash_algo);
mode_i = 0;
}