Objects ======= .. cl:package:: cl-git Creating -------- .. cl:generic:: make-object Accessing --------- .. cl:generic:: get-object .. cl:generic:: list-objects Note that although we are looking up a commit we specify as class OBJECT. The advantage of specifying OBJECT instead of COMMIT is that you do not need to know that the SHA refers to a commit. If the SHA refers to a tag a tag will be returned. However if we do not know the SHA-1 but we do know a reference, such as a branch name or tag. We can get to the commit in a slightly more cumbersome way. (A list of references is easy to get, see the previous section.) Deleting -------- .. cl:generic:: delete-object Inspecting ---------- .. cl:generic:: oid .. cl:generic:: full-name .. cl:generic:: short-name Errors ------ Error conditions can be raised from libgit2 and will be converted into conditions instead of returning NIL values. .. code-block:: common-lisp-repl GIT> (get-object 'object 1 (open-repository #p"/home/russell/projects/ecl/")) ; Raises NOT-FOUND condition For each of the possible libgit2 errors there is a different condition that will be raised. .. cl:clos-class:: basic-error .. cl:clos-class:: general-error .. cl:clos-class:: not-found-error .. cl:clos-class:: exists-error .. cl:clos-class:: ambiguous-error .. cl:clos-class:: buffer-error .. cl:clos-class:: user-error .. cl:clos-class:: barerepo-error .. cl:clos-class:: unborn-branch-error .. cl:clos-class:: unmerged-error .. cl:clos-class:: non-fast-forward-error .. cl:clos-class:: invalid-spec-error .. cl:clos-class:: conflict-error .. cl:clos-class:: locked-error .. cl:clos-class:: modified-error .. cl:clos-class:: auth-error .. cl:clos-class:: certificate-error .. cl:clos-class:: applied-error .. cl:clos-class:: peel-error .. cl:clos-class:: eof-error .. cl:clos-class:: invalid-error .. cl:clos-class:: uncommitted-error .. cl:clos-class:: directory-error .. cl:clos-class:: merge-conflict-error .. cl:clos-class:: mismatch-error .. cl:clos-class:: index-dirty-error .. cl:clos-class:: apply-fail-error Control Flow Errors ~~~~~~~~~~~~~~~~~~~ .. cl:clos-class:: passthrough .. cl:clos-class:: stop-iteration .. cl:clos-class:: retry