loose: don't rely on repository global statekn/loose-object-layer-wo-global-hash
commit432f666aa6d9f69d578d44f8c6d6bdb865152ad5
authorKarthik Nayak <karthik.188@gmail.com>
Wed, 9 Oct 2024 09:58:59 +0000 (9 02:58 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 9 Oct 2024 18:51:31 +0000 (9 11:51 -0700)
treee5705e13c4541af55faafabfbe4a037f70c29ac0
parent777489f9e09c8d0dd6b12f9d90de6376330577a2
loose: don't rely on repository global state

In `loose.c`, we rely on the global variable `the_hash_algo`. As such we
have guarded the file with the 'USE_THE_REPOSITORY_VARIABLE' definition.
Let's derive the hash algorithm from the available repository variable
and remove this guard. This brings us one step closer to removing the
global 'the_repository' variable.

Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
loose.c