From: Karthik Nayak Date: Mon, 19 Oct 2026 20:21:08 GMT Subject: Re: [PATCH 1/7] loose: drop unused `repo_write_loose_object_map()` Message-ID: In-Reply-To: <20261019-b4-pks-odb-extension-v1-1-143a5963b77f@pks.im> Patrick Steinhardt writes: > The function `repo_write_loose_object_map()` was introduced in > 23b2c7e95b (loose: add a mapping between SHA-1 and SHA-256 for loose > objects, 2023-10-01), but it never had any callers as loose object maps > are instead written incrementally via `repo_add_loose_object_map()` > whenever a new loose object is created. > > Besides being dead code, the function also hardcodes the location of the > "loose-object-idx" file as "$GIT_COMMON_DIR/objects", whereas both the > reader and `repo_add_loose_object_map()` derive the location from the > loose source's path. The function would thus disagree with everyone else > where the loose object map is supposed to be located when the object > directory is using a non-default location. > > Remove the function. > It's like the function being unused is an insufficient argument by itself, so we also talk about why its incorrect. Made me chuckle. The patch obviously makes sense. [snip]