From: Shenghou Ma Date: Sun, 7 Jul 2013 15:06:30 +0000 (+0800) Subject: cmd/go: fix "go get -u" for git repositories. X-Git-Tag: go1.2rc2~1104 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=8b16a8bbc10c9cfc07123311e1cc05263c7beec9;p=gostls13.git cmd/go: fix "go get -u" for git repositories. CL 10869046 changed cmd/go to checkout master branch, so for "go get -u" to work, it must "git pull" instead of "git fetch". Added "--ff-only" so that it won't accidentally overwrite user changes. R=dsymonds CC=golang-dev https://golang.org/cl/10907043 --- diff --git a/src/cmd/go/vcs.go b/src/cmd/go/vcs.go index 504b3bf548..59bc2adbe7 100644 --- a/src/cmd/go/vcs.go +++ b/src/cmd/go/vcs.go @@ -91,7 +91,7 @@ var vcsGit = &vcsCmd{ cmd: "git", createCmd: "clone {repo} {dir}", - downloadCmd: "fetch", + downloadCmd: "pull --ff-only", tagCmd: []tagCmd{ // tags/xxx matches a git tag named xxx