diff options
author | Junio C Hamano <gitster@pobox.com> | 2025-04-08 14:28:17 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2025-04-08 14:28:17 -0700 |
commit | 0dfca9888191bcea4fa00fb3c7abda787e06cf75 (patch) | |
tree | b1aaec26bf06b5679e256e298ba389aaf0ca1b00 /commit-graph.c | |
parent | 9d22ac51228304102deb62f30c3ecba6377e1237 (diff) | |
parent | 7d70b29c4f0b2fd3c6698956d9fb4026632d9c6e (diff) |
Merge branch 'ps/object-wo-the-repository' into ps/object-file-cleanup
* ps/object-wo-the-repository:
hash: stop depending on `the_repository` in `null_oid()`
hash: fix "-Wsign-compare" warnings
object-file: split out logic regarding hash algorithms
delta-islands: stop depending on `the_repository`
object-file-convert: stop depending on `the_repository`
pack-bitmap-write: stop depending on `the_repository`
pack-revindex: stop depending on `the_repository`
pack-check: stop depending on `the_repository`
environment: move access to "core.bigFileThreshold" into repo settings
pack-write: stop depending on `the_repository` and `the_hash_algo`
object: stop depending on `the_repository`
csum-file: stop depending on `the_repository`
Diffstat (limited to 'commit-graph.c')
-rw-r--r-- | commit-graph.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/commit-graph.c b/commit-graph.c index 1021ccb983..8286d5dda2 100644 --- a/commit-graph.c +++ b/commit-graph.c @@ -2090,11 +2090,13 @@ static int write_commit_graph_file(struct write_commit_graph_context *ctx) return -1; } - f = hashfd(get_tempfile_fd(graph_layer), get_tempfile_path(graph_layer)); + f = hashfd(the_repository->hash_algo, + get_tempfile_fd(graph_layer), get_tempfile_path(graph_layer)); } else { hold_lock_file_for_update_mode(&lk, ctx->graph_name, LOCK_DIE_ON_ERROR, 0444); - f = hashfd(get_lock_file_fd(&lk), get_lock_file_path(&lk)); + f = hashfd(the_repository->hash_algo, + get_lock_file_fd(&lk), get_lock_file_path(&lk)); } cf = init_chunkfile(f); @@ -2716,7 +2718,8 @@ static void graph_report(const char *fmt, ...) static int commit_graph_checksum_valid(struct commit_graph *g) { - return hashfile_checksum_valid(g->data, g->data_len); + return hashfile_checksum_valid(the_repository->hash_algo, + g->data, g->data_len); } static int verify_one_commit_graph(struct repository *r, |