From 8b16a8bbc10c9cfc07123311e1cc05263c7beec9 Mon Sep 17 00:00:00 2001 From: Shenghou Ma Date: Sun, 7 Jul 2013 23:06:30 +0800 Subject: [PATCH] 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 --- src/cmd/go/vcs.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.48.1