Commits

evhan committed 6d1d499

update reference documentation

  • Participants
  • Parent commits 8a9dfa9

Comments (0)

Files changed (1)

 as {{"HEAD"}}, {{"ref/heads/master"}}, or {{"refs/tags/v0.1.0"}}. An error is
 signalled if the reference doesn't exists.
 
+<procedure>(reference-name reference) => string</procedure>
+<procedure>(reference-id reference) => oid</procedure>
+
+Returns the name of the given {{reference}} and the {{oid}} of the
+object referred to by the given {{reference}}, respectively.
+
+<procedure>(reference-type reference) => symbol</procedure>
+
+Returns the type symbol of the given {{reference}}, which will be either
+{{'oid}} or {{'symbolic}}.
+
+<procedure>(reference-remote? reference) => boolean</procedure>
+<procedure>(reference-branch? reference) => boolean</procedure>
+
+These procedures return boolean values indicating whether the given
+reference is a remote- or branch-type reference, respectively.
+
 <procedure>(references-fold kons knil repository [type]) => object</procedure>
 
 Folds over the given {{repository}}'s references in unspecified order.
 Returns a reference to this repository's HEAD (resolved to an OID), of
 {{#f}} if it doesn't exist.
 
-<procedure>(reference-name reference) => string</procedure>
-<procedure>(reference-id reference) => oid</procedure>
-
-Returns the name of the given {{reference}} and the {{oid}} of the
-object referred to by the given {{reference}}, respectively.
-
 <procedure>(reference-resolve reference) => reference</procedure>
 
-Dereferences the given (possibly symbolic) {{reference}}, returning a new
-non-symbolic {{reference}} pointing refering directly to an {{oid}}.
+Recursively dereferences the given (possibly symbolic) {{reference}},
+returning a new non-symbolic {{reference}} pointing refering directly to
+an {{oid}}.
 
 <procedure>(reference-target reference) => string</procedure>
 
 
 On success, the on-disk repository is updated immediately.
 
+<procedure>(reference-delete reference) => void</procedure>
+
+Deletes the given {{reference}} from its repository.
+
+On success, the on-disk repository is updated immediately.
+
 ==== Branch
 
 <procedure>(create-branch repository name target [force]) => reference</procedure>