opened
vchuravy
username_0
https://github.com/QuantEcon/InstantiateFromURL.jl/blob/25e93412b9c7a46d22487a9ea919224f574730fc/src/activate.jl#L7

SHAs can be normally be shorter than 40chars as long as they are still unique within a repository. Normally about 6 chars is enough for that.
SHA can be abbreviated
issue
created
jlperla
username_1
I think the sha serves two purposes here.  First, it makes it so that we can download a tarball, as in https://github.com/QuantEcon/InstantiateFromURL.jl/blob/master/src/activate.jl#L21

Is there a consistent way that we could take 6'ish characters and have the API call `"https://github.com/$(reponame)/archive/$(sha).tar.gz"`  work?  If so, is it a particular 6 characters (end or beginning, for example).
comment
created
vchuravy
username_0
It must be the beginning of the SHA, as an example this seems to work https://github.com/QuantEcon/InstantiateFromURL.jl/archive/25e9341.tar.gz
comment
created
jlperla
username_1
@username_2 Can you give this a shot?  If so, then I think we should drop the `sha` length check, and convert the tests to use the 6 characters at the beginning of SHA for the master and tag versions?  The version with the sha passed in directly should require no modifications, if I recall...
comment
closed
arnavs
username_2
issue
created
arnavs
username_2
Done. Was a little trickier than anticipated, because the tarballs we get from GitHub always unpack into full-SHA directories. The only invariant we enforce on the hash we pass in is that it's at least 6 characters.
comment