]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: fix "go get -u" for git repositories.
authorShenghou Ma <minux.ma@gmail.com>
Sun, 7 Jul 2013 15:06:30 +0000 (23:06 +0800)
committerShenghou Ma <minux.ma@gmail.com>
Sun, 7 Jul 2013 15:06:30 +0000 (23:06 +0800)
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

src/cmd/go/vcs.go

index 504b3bf54833ce017aaa3694120158d6fbd1e5c7..59bc2adbe7ecea67232f0467905225747fa53ada 100644 (file)
@@ -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