Christian Couder posted v2 of the third part of brian m. carlson's SHA-1/SHA-256 interoperability work. It adds support for reading and writing pack index v3, which records object IDs in both the main and compatibility hash algorithms. Interoperability needs that so packed objects can be mapped between algorithms, as the loose object map already does for loose objects. Most patches come from brian's sha256-interop-part-2 branch; patch 10 is new, inserted by Couder.

On why v3 is needed, brian explained that index v1 and v2 cannot be used in a repository with compatibility object IDs because they do not preserve the mapping. Indexing a pack with v2 there would lose the mapping and leave the repository effectively corrupt, and many operations would die. He believes a later patch in the series forces v3 whenever a compatibility algorithm is in use, much as SHA-256 bundles always use bundle v3.

Junio Hamano asked whether the series regresses indexing with v2. In unpack_entry_data() and resolve_delta(), the compatibility conversion runs even when the index version is below 3. Because index-pack cannot yet convert commits or trees whose referenced objects appear later in the pack, he wrote that an ordinary 'git index-pack' writing a v2 index in a compatibility repository could now fail on packs that previously succeeded. He also noted that the code handles both hash directions symmetrically, so a commit message mentioning only SHA-256 to SHA-1 needs rewording.

Kaartic Sivaraam raised several points on the object-database patches. He suggested naming clarity around repo_oid_to_algop. He thought repo_loose_object_map_oid and repo_read_loose_object_map may be dead code after the patch. He objected that a generic write flag depends on the loose backend for the value of OBJ_MAP_WRITE, and proposed defining ODB_WRITE_OID_MAP_WRITE and letting the loose backend derive its own value. He also asked whether reloading the map per directory is an intentional behaviour change.

A side discussion covered the phrasing of commit messages. brian defended the 'Let's make this...' form, which he picked up from Jeff King's messages. Sivaraam later agreed that it is a common unwritten exception to the imperative-mood guideline, though he still flagged one message as a nit.

The v2 regression question and Sivaraam's design points were unanswered in the excerpts.