Re: [PATCH 1/5] loose: load loose object map for the correct source
Junio C Hamano <[email protected]>
| Newsgroups | org.kernel.vger.git |
|---|---|
| Message-ID | <[email protected]> |
Patrick Steinhardt <[email protected]> writes: > When loading the loose object map via `load_one_loose_object_map()` we > pass in both a repository and the corresponding source. We ultimately > don't really respect the passed-in source though as we instead always > load the map via the common directory. This doesn't make any sense > though, as the function is called in a loop through all sources, and as > such the expectation is that we'll load the map that belongs to the > given source. > > Fix this bug by instead loading the map via the loose source's path. Makes perfect sense. We still need access to the 'repo' to learn the hash algorithm used in the repository along with built-in object names, but they are now obtained from the repository associated with the loose object source, which is far more consistent.