Skip to content
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

cmd/go: go get -u broken for git repos when upgrading from 1.1 to tip #6042

Closed
dominikh opened this issue Aug 5, 2013 · 4 comments
Closed
Milestone

Comments

@dominikh
Copy link
Member

dominikh commented Aug 5, 2013

What steps will reproduce the problem?
If possible, include a link to a program on play.golang.org.
1. With 1.1, `go get` a package from e.g. GitHub
2. With tip, `go get -u` the same package
3.

What is the expected output?
`go get -u` should finish without an error

What do you see instead?
# cd /home/dominikh/prj/go/src/github.com/kisielk/errcheck; git pull --ff-only
You are not currently on a branch. Please specify which
branch you want to merge with. See git-pull(1) for details.

    git pull <remote> <branch>

package github.com/kisielk/errcheck: exit status 1


Which compiler are you using (5g, 6g, 8g, gccgo)?


Which operating system are you using?
Linux / git version 1.8.1.5

Which version are you using?  (run 'go version')
go version devel +5af92313c1b8 Mon Aug 05 11:59:59 2013 +1000 linux/amd64

Please provide any additional information below.
https://golang.org/cl/10869046/ and
https://golang.org/cl/10907043 changed the behaviour of `go get` to
use the master branch and `git pull` instead of `git fetch` for updating.

This, however, breaks `go get -u` when the initial `go get` was done before
these changes, i.e. with the current release version of Go.

The old `go get` will result in a repository that requires `git fetch` to be
updated but the new `go get` will only attempt `git pull`. This means
that if the next version of Go includes these changes, `go get -u` will
be broken for all already installed packages that use git.
@rsc
Copy link
Contributor

rsc commented Aug 5, 2013

Comment 1:

Labels changed: added priority-later, removed priority-triage.

Status changed to Accepted.

@dsymonds
Copy link
Contributor

dsymonds commented Aug 6, 2013

Comment 2:

We could change the command to be effectively
  git symbolic-ref HEAD || git checkout master ; git pull --ff-only
That would "upgrade" the bad (old) checkouts to functional checkouts, and do nothing for
correct checkouts.

@dsymonds
Copy link
Contributor

Comment 3:

Labels changed: added priority-soon, go1.2, toolbug, removed priority-later, go1.2maybe.

Owner changed to @dsymonds.

Status changed to Started.

@dsymonds
Copy link
Contributor

Comment 4:

This issue was closed by revision 80ca8c5.

Status changed to Fixed.

@rsc rsc added this to the Go1.2 milestone Apr 14, 2015
@rsc rsc removed the go1.2 label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants