Page MenuHomeSoftware Heritage

swh identify: add a -R/--recursive flag
Closed, ResolvedPublic

Description

swh identify does not show its output recursively when invoked on non-leaf objects such as directories:

$ swh identify /srv/src/linux/linux-5.9.1/kernel/
swh:1:dir:5f18abc022c8aa2652008ca75314281d552c8498	/srv/src/linux/linux-5.9.1/kernel/

but to compute that output it of course has processed the entire directory recursively, as that is required by Merkle properties.

We should add a classic -R/--recursive flag to swh identify that requests to output recursively all SWHIDs of recursive objects (at the very least directories, but it would make sense also on snapshots and revisions).