]> git.99rst.org Git - git.git/commit
refs: remove the_hash_algo global state
authorShreyansh Paliwal <redacted>
Sat, 4 Apr 2026 13:58:39 +0000 (19:28 +0530)
committerJunio C Hamano <redacted>
Wed, 8 Apr 2026 16:58:10 +0000 (09:58 -0700)
commit9a03f165a41d708c672e18e69d43f69689981e7d
tree08105bde9f44b570cebce5464a8ca35cd5a44002
parentb886f0b5dc71030bc9dcf58376533cf8e1098e9a
refs: remove the_hash_algo global state

refs.c uses the_hash_algo in multiple places, relying on global state for
the object hash algorithm. Replace these uses with the appropriate
repository-specific hash_algo. In transaction-related functions
(ref_transaction_create, ref_transaction_delete, migrate_one_ref, and
transaction_hook_feed_stdin), use transaction->ref_store->repo->hash_algo.
In other cases, such as repo_get_submodule_ref_store(), use
repo->hash_algo.

Signed-off-by: Shreyansh Paliwal <redacted>
Acked-by: Patrick Steinhardt <redacted>
Signed-off-by: Junio C Hamano <redacted>
refs.c
git clone https://git.99rst.org/PROJECT