HomeSoftware Heritage

Normalize _add() methods of the ProvenanceStorage interface

Description

Normalize _add() methods of the ProvenanceStorage interface

make them all accept a Dict[Sha1Git, xxx] as argument, ie:

  • remove support for Iterable[bytes] in revision_add, and
  • replace Iterable[bytes] by Dict[Sha1Git, bytes] for location_add

Currently, the sha1 of location path in location_add() is not really
used by any backend, so the computation of said hashed is a waste of
resource, but it makes the API of this interface much more consistent
which will be helpful for coming features (like kafka journal).

Details