Page MenuHomeSoftware Heritage

swh-identify: add support for --type revision
Closed, MigratedEdits Locked

Description

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.

Event Timeline

zack triaged this task as Normal priority.Sep 8 2020, 9:12 AM
zack created this task.

do we mean something else than echo swh:1:rev:$(git rev-parse HEAD) ?
Do we want support for other (supported) VCS?

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.