aboutsummaryrefslogtreecommitdiffstats
path: root/repository.go
diff options
context:
space:
mode:
Diffstat (limited to 'repository.go')
-rw-r--r--repository.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/repository.go b/repository.go
index c05afdb..1342e7d 100644
--- a/repository.go
+++ b/repository.go
@@ -218,3 +218,10 @@ func (r *Repository) Object(h core.Hash) (Object, error) {
return nil, core.ErrInvalidType
}
}
+
+// Head returns the hash of the HEAD of the repository. If there is no
+// HEAD, it then returns the hash of the HEAD of the default remote. If
+// there is no default remote, it returns an error.
+func (r *Repository) Head() (core.Hash, error) {
+ return core.ZeroHash, nil
+}