diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2016-04-25 08:57:48 +0200 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2016-04-25 08:57:48 +0200 |
commit | 74b8b53b28d444542edc77e0beec19bbab8e8037 (patch) | |
tree | d311444af46cc4b24e48ce5f8b86da99f28585c1 /remote.go | |
parent | a84f6e9637d5fac2fb5a6164b633ed07c9a0a8e6 (diff) | |
download | go-git-74b8b53b28d444542edc77e0beec19bbab8e8037.tar.gz |
remote.Head and repository.PullDefault
Diffstat (limited to 'remote.go')
-rw-r--r-- | remote.go | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -81,6 +81,11 @@ func (r *Remote) DefaultBranch() string { return r.upInfo.Capabilities.SymbolicReference("HEAD") } +// Head returns the Hash of the HEAD +func (r *Remote) Head() (core.Hash, error) { + return r.Ref(r.DefaultBranch()) +} + // Fetch returns a reader using the request func (r *Remote) Fetch(req *common.GitUploadPackRequest) (io.ReadCloser, error) { return r.upSrv.Fetch(req) |