Commit 0ffc60a
committed
Add SoftWare Heritage persistent IDentifiers
See
https://docs.softwareheritage.org/devel/swh-model/persistent-identifiers.html
for the technical details of that spec.
Software Heritage has done a superb job promoting content addressing in
general, and their identifier scheme (SWHIDs, for short) in particular.
By supporting them in CIDs / IPLD, I hope the IPFS ecosystem can align
itself with that effort.
Per the linked documentation, SWHIDs have their own nested grammar and
versioning scheme. I have taken the version 1 core identifier grammar,
unrolled it, and replaced `:` with `-` per the guidelines on separators,
with the result being these 5 rows.
Also note that some of those schemes coincide with certain forms of
`git-raw`, already in this table. However, adding them here is not
redundant, because the deserialization direction. While a git-raw CID
may legally point to any sort of git object, the relevant SWHIDs specify
in the identifier what sort of git object is expected, and if it points
to a different type of valid git object, deserialization fails. That
means there is no way to losslessly convert a git-coinciding SWHID into
a git-raw CID.1 parent d4b3853 commit 0ffc60a
1 file changed
+5
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
113 | 118 | | |
114 | 119 | | |
115 | 120 | | |
| |||
0 commit comments