aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/git
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2017-06-15 18:22:50 +0200
committerDmitry Vyukov <dvyukov@google.com>2017-06-15 18:29:47 +0200
commitc8a3e46192f6340116762123e955ab7fcf4bcac7 (patch)
treee52fda6cdb7b8aeaf5cddbe9b1fdb9bbd2796485 /pkg/git
parentc1220233d88a1a32fec4ab21ca8569bea04f988a (diff)
pkg/git: fix git fetch command line
Diffstat (limited to 'pkg/git')
-rw-r--r--pkg/git/git.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/git/git.go b/pkg/git/git.go
index 8ee05f9fe..8e492177a 100644
--- a/pkg/git/git.go
+++ b/pkg/git/git.go
@@ -19,7 +19,7 @@ const timeout = time.Hour // timeout for all git invocations
// Returns hash of the HEAD commit in the specified branch.
func Poll(dir, repo, branch string) (string, error) {
osutil.RunCmd(timeout, dir, "git", "reset", "--hard")
- if _, err := osutil.RunCmd(timeout, dir, "git", "fetch", "--no-tags", "--depth=", "1"); err != nil {
+ if _, err := osutil.RunCmd(timeout, dir, "git", "fetch", "--no-tags", "--depth", "1"); err != nil {
if err := os.RemoveAll(dir); err != nil {
return "", fmt.Errorf("failed to remove repo dir: %v", err)
}