diff options
Diffstat (limited to 'docs/git2/Reference.luadoc')
-rw-r--r-- | docs/git2/Reference.luadoc | 148 |
1 files changed, 148 insertions, 0 deletions
diff --git a/docs/git2/Reference.luadoc b/docs/git2/Reference.luadoc new file mode 100644 index 0000000..4c4fae9 --- /dev/null +++ b/docs/git2/Reference.luadoc @@ -0,0 +1,148 @@ +-- +-- Warning: AUTOGENERATED DOCS. +-- + +--- Class "Reference". +-- +module("Reference") + +--- Create a new Reference object. +-- +-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/reference/git_reference_lookup">git_reference_lookup</a>:<p><p>The generated reference must be freed by the user. +-- @param repo the repository to look up the reference. Must be of type <a href="Repository.html">Repository</a>. +-- @param name the long name for the reference (e.g. HEAD, ref/heads/master, refs/tags/v0.1.0, ...). Must be of type <code>string</code>. +-- @return <a href="Reference.html">Reference</a> or <code>nil</code> on error. +-- @return Error string. +-- @name Reference.lookup +function Reference.lookup(repo, name) +end + +--- object method. +-- +-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/reference/git_reference_oid">git_reference_oid</a>:<p><p>Only available if the reference is direct (i.e. not symbolic) +-- @return <a href="OID.html">OID</a>. +-- @name Reference:oid +function Reference:oid() +end + +--- object method. +-- +-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/reference/git_reference_set_oid">git_reference_set_oid</a>:<p><p>The reference must be a direct reference, otherwise +-- this method will fail.<p> The reference will be automatically updated in +-- memory and on disk. +-- @param oid Must be of type <a href="OID.html">OID</a>. +-- @return <code>true</code> if no error. +-- @return Error string. +-- @name Reference:set_oid +function Reference:set_oid(oid) +end + +--- object method. +-- +-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/reference/git_reference_target">git_reference_target</a>:<p><p>Only available if the reference is symbolic +-- @return <code>string</code>. +-- @name Reference:target +function Reference:target() +end + +--- object method. +-- +-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/reference/git_reference_set_target">git_reference_set_target</a>:<p><p>The reference must be a symbolic reference, otherwise +-- this method will fail.<p> The reference will be automatically updated in +-- memory and on disk. +-- @param target The new target for the reference. Must be of type <code>string</code>. +-- @return <code>true</code> if no error. +-- @return Error string. +-- @name Reference:set_target +function Reference:set_target(target) +end + +--- object method. +-- +-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/reference/git_reference_type">git_reference_type</a>:<p><p>Either direct (GIT_REF_OID) or symbolic (GIT_REF_SYMBOLIC) +-- @return <code>integer</code>. +-- @name Reference:type +function Reference:type() +end + +--- object method. +-- +-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/reference/git_reference_name">git_reference_name</a>:<p><p> +-- @return <code>string</code>. +-- @name Reference:name +function Reference:name() +end + +--- object method. +-- +-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/reference/git_reference_resolve">git_reference_resolve</a>:<p><p>Thie method iteratively peels a symbolic reference +-- until it resolves to a direct reference to an OID.<p> The peeled reference is returned in the `resolved_ref` +-- argument, and must be freed manually once it's no longer +-- needed.<p> If a direct reference is passed as an argument, +-- a copy of that reference is returned. This copy must +-- be manually freed too. +-- @return <a href="Reference.html">Reference</a> or <code>nil</code> on error. +-- @return Error string. +-- @name Reference:resolve +function Reference:resolve() +end + +--- object method. +-- +-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/reference/git_reference_owner">git_reference_owner</a>:<p><p> +-- @return <a href="Repository.html">Repository</a>. +-- @name Reference:owner +function Reference:owner() +end + +--- object method. +-- +-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/reference/git_reference_rename">git_reference_rename</a>:<p><p>This method works for both direct and symbolic references. +-- The new name will be checked for validity and may be +-- modified into a normalized form.<p> The given git_reference will be updated in place.<p> The reference will be immediately renamed in-memory +-- and on disk.<p> If the `force` flag is not enabled, and there's already +-- a reference with the given name, the renaming will fail.<p> IMPORTANT: +-- The user needs to write a proper reflog entry if the +-- reflog is enabled for the repository. We only rename +-- the reflog if it exists. +-- @param new_name The new name for the reference. Must be of type <code>string</code>. +-- @param force Overwrite an existing reference. Must be of type <code>boolean</code>. +-- @return <code>true</code> if no error. +-- @return Error string. +-- @name Reference:rename +function Reference:rename(new_name, force) +end + +--- object method. +-- +-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/reference/git_reference_delete">git_reference_delete</a>:<p><p>This method works for both direct and symbolic references.<p> The reference will be immediately removed on disk and from +-- memory. The given reference pointer will no longer be valid. +-- @return <code>true</code> if no error. +-- @return Error string. +-- @name Reference:delete +function Reference:delete() +end + +--- module function. +-- +-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/reference/git_reference_packall">git_reference_packall</a>:<p><p>This method will load into the cache all the loose +-- references on the repository and update the +-- `packed-refs` file with them.<p> Once the `packed-refs` file has been written properly, +-- the loose references will be removed from disk. +-- @param repo Repository where the loose refs will be packed. Must be of type <a href="Repository.html">Repository</a>. +-- @return <code>true</code> if no error. +-- @return Error string. +-- @name Reference.packall +function Reference.packall(repo) +end + +--- module function. +-- +-- @param repo Must be of type <a href="Repository.html">Repository</a>. +-- @param list_flags Must be of type <code>integer</code>. +-- @return <a href="StrArray.html">StrArray</a> or <code>nil</code> on error. +-- @return Error string. +-- @name Reference.list +function Reference.list(repo, list_flags) +end + |