]> git.ipfire.org Git - thirdparty/git.git/commit
odb: move computation of normalized objdir into `alt_odb_usable()`
authorPatrick Steinhardt <ps@pks.im>
Thu, 11 Dec 2025 09:30:12 +0000 (10:30 +0100)
committerJunio C Hamano <gitster@pobox.com>
Thu, 11 Dec 2025 09:39:35 +0000 (18:39 +0900)
commitd17673ef4285d3d5f70909136f1ffe2745bcb71c
treec69cc3f8ca9782f8ca1287886b66af3a80eb6102
parent84cec5276e70bdabd651a3d0a250d006434d639f
odb: move computation of normalized objdir into `alt_odb_usable()`

The function `alt_odb_usable()` receives as input the object database,
the path it's supposed to determine usability for as well as the
normalized path of the main object directory of the repository. The last
part is derived by the function's caller from the object database. As we
already pass the object database to `alt_odb_usable()` it is redundant
information.

Drop the extra parameter and compute the normalized object directory in
the function itself.

While at it, rename the function to `odb_is_source_usable()` to align it
with modern terminology.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
odb.c