swh-identify: add support for --type revision
swh identify
allows to compute the SWHID for local, bare git repositories returning snp
SWHIDs, but not to compute/verify SWHID for individual commits (type rev
).
We want to be able to support that, with a user experience yet to be determined.
A good start would be to allow getting a SWHID for the commit (or whatever git object, really) currently pointed by HEAD. That way we can rely on the user to first put the local git repo in the desired state, and then invoke swh identify on it.
Migrated from T2571 (view on Phabricator)