Skip to content

Commit 7079ec6

Browse files
committed
docs: Talk about tags that aren't versions in the "Package identifiers" section
1 parent c878051 commit 7079ec6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

doc/rustpkg.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,14 @@ A package ID can also specify a version, like:
7676
`github.com/mozilla/rust#0.3`.
7777
In this case, `rustpkg` will check that the repository `github.com/mozilla/rust` has a tag named `0.3`,
7878
and report an error otherwise.
79+
A package ID can also specify a particular revision of a repository, like:
80+
`github.com/mozilla/rust#release-0.7`.
81+
When the refspec (portion of the package ID after the `#`) can't be parsed as a decimal number,
82+
rustpkg passes the refspec along to the version control system without interpreting it.
83+
rustpkg also interprets any dependencies on such a package ID literally
84+
(as opposed to versions, where a newer version satisfies a dependency on an older version).
85+
Thus, `github.com/mozilla/rust#5c4cd30f80` is also a valid package ID,
86+
since git can deduce that 5c4cd30f80 refers to a revision of the desired repository.
7987

8088
## Source files
8189

0 commit comments

Comments
 (0)