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.
Description
Description
Event Timeline
Comment Actions
do we mean something else than echo swh:1:rev:$(git rev-parse HEAD) ?
Do we want support for other (supported) VCS?
Comment Actions
Re supported VCSs: sure, but I'd start with git that is a low-hanging fruit.
Regarding the returned SWHID it would be nice to also allow to reference rel objects.