aboutsummaryrefslogtreecommitdiffstats
path: root/remote.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2015-11-10 21:07:29 +0100
committerMáximo Cuadros <mcuadros@gmail.com>2015-11-10 21:07:29 +0100
commit49f40d9f410a6fc0a9c89ba228d16cd570ec711a (patch)
tree8d7e5cdab936131e7520f5462739857adf1eca8e /remote.go
parentb7cf99f3e80e482e743448fb633612cd02090a7c (diff)
downloadgo-git-49f40d9f410a6fc0a9c89ba228d16cd570ec711a.tar.gz
common: GitUploadPackRequest Want, Have methods
Diffstat (limited to 'remote.go')
-rw-r--r--remote.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/remote.go b/remote.go
index e0acb33..e28a3b0 100644
--- a/remote.go
+++ b/remote.go
@@ -89,9 +89,10 @@ func (r *Remote) FetchDefaultBranch() (io.ReadCloser, error) {
return nil, err
}
- return r.Fetch(&common.GitUploadPackRequest{
- Want: []core.Hash{ref},
- })
+ req := &common.GitUploadPackRequest{}
+ req.Want(ref)
+
+ return r.Fetch(req)
}
// Ref returns the Hash pointing the given refName