aboutsummaryrefslogtreecommitdiffstats
path: root/remote.go
diff options
context:
space:
mode:
Diffstat (limited to 'remote.go')
-rw-r--r--remote.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/remote.go b/remote.go
index 283b6b3..095faff 100644
--- a/remote.go
+++ b/remote.go
@@ -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)