cmd/go/internal/modfetch: allow branch name as rev identifier

If someone runs "vgo get x@rev" or adds "require x rev" to go.mod
and rev is a commit hash or git tag, vgo automatically replaces it
with the pseudo-version for the underlying commit.
This CL makes vgo do the same for branch names:
the head commit of the branch at that moment is recorded.
This allows running

	vgo get github.com/gobuffalo/buffalo@development

to sync with the current buffalo development branch.

Fixes golang/go#24045.

Change-Id: I8a58ed3a574e5ee839d37ad452436f80ac8081dc
Reviewed-on: https://go-review.googlesource.com/105216
Reviewed-by: Bryan C. Mills <bcmills@google.com>
4 files changed
tree: 70f2015514aac63f6bf179fbd494d1dd974c972e
  1. vendor/
  2. AUTHORS
  3. codereview.cfg
  4. CONTRIBUTING.md
  5. CONTRIBUTORS
  6. LICENSE
  7. main.go
  8. PATENTS
  9. README.md
README.md

Versioned Go Prototype (vgo)

This repository holds a prototype of what the go command might look like with integrated support for package versioning.

See research.swtch.com/vgo for documents about the design.

Download/Install

Use go get -u golang.org/x/vgo.

You can also manually git clone the repository to $GOPATH/src/golang.org/x/vgo.

Report Issues / Send Patches

See CONTRIBUTING.md.

This is still a very early prototype. You are likely to run into bugs. Please file bugs in the main Go issue tracker, golang.org/issue, and put the prefix x/vgo: in the issue title.

Thank you.