gobin icon indicating copy to clipboard operation
gobin copied to clipboard

Support caching of revision identifiers

Open myitcv opened this issue 5 years ago • 1 comments

Currently (well, once #32 is merged to be precise), gobin foo.com/bar@$revision will be the only form of gobin that always hit the network.

We can do better here by caching the resolution of these revision identifiers.

That way we unify the -u behaviour:

gobin foo.com/bar@master      # hits the network first time we need to resolve master
gobin foo.com/bar@master      # does not hit network
gobin -u foo.com/bar@master   # hits network

cc @rogpeppe

myitcv avatar Nov 02 '18 13:11 myitcv

To add a brief note; sufficient VCS information is not available in $GOPATH/pkg/mod/cache/vcs because each directory there is a shallow copy of the remote, hence it does not have any remote reference information.

myitcv avatar Nov 03 '18 06:11 myitcv