-
Notifications
You must be signed in to change notification settings - Fork 427
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: "revision" field in rockspecs #569
Comments
Looks like a good idea, but probably can be "fixed" only in LR 3 for compatibility reasons.
How would you pick the branch? I think this requires cloning full repo and then checking out the revision directly. |
I swear I've requested before somewhere but I can't find a link. FWIW some git programs use the fragment to indicate it. |
This doesn't appear to work with the regular command line git which luarocks uses. (at least with my git 2.7.4) |
Luarocks could split out the revision itself, of course. |
Correct. it's not used by the Which brings me to an alternate idea: we already have a |
It doesn't work with clone, and it's impossible to know whether it's a branch or a commit hash beforehand if it only consists of hexadecimal characters. |
We can pass it straight to e.g. |
But then we have to always clone full repo. |
I wonder how e.g. npm handle this? (they use the same fragment thing) |
here's the relevant part of the npm source afaict It looks like they do a full clone into a cache, and then every time they need a version of that package they clone->checkout from it. |
And in hererocks I do full clone if the ref is hexadecimal and pass it to |
example:
In this context revision means an atomic reference to a repo's state, e.g. commit hashes in git and changeset IDs in Mercurial.
This can be useful for when you don't directly control a source repo to add tags to it, or if you want more specific rockspecs than you want tags. It can also be used as verification for tags, the same way source.md5 is used.
Implementation-wise, it doesn't look like git lets you clone a specific commit, so instead you need to pick the closest branch/tag and then
git checkout
from there. Mercurial's--rev
flag also does changesets in addition to branches/tags so there it's just a matter of also passing the changeset id in.The text was updated successfully, but these errors were encountered: