From 2c920a74a9653adb625070a5f416f6394aae8147 Mon Sep 17 00:00:00 2001 From: "Robert G. Jakabosky" Date: Thu, 21 Jun 2012 11:06:20 -0700 Subject: Commit generated API docs. --- docs/git2.luadoc | 37 ++ docs/git2/Blob.luadoc | 101 +++++ docs/git2/Commit.luadoc | 160 ++++++++ docs/git2/Config.luadoc | 147 +++++++ docs/git2/Index.luadoc | 174 ++++++++ docs/git2/IndexEntry.luadoc | 133 ++++++ docs/git2/IndexEntryUnmerged.luadoc | 31 ++ docs/git2/ODB.luadoc | 159 ++++++++ docs/git2/ODBBackend.luadoc | 15 + docs/git2/OID.luadoc | 58 +++ docs/git2/OID_Shorten.luadoc | 36 ++ docs/git2/Object.luadoc | 63 +++ docs/git2/OdbObject.luadoc | 52 +++ docs/git2/Reference.luadoc | 148 +++++++ docs/git2/Repository.luadoc | 177 ++++++++ docs/git2/RevWalk.luadoc | 96 +++++ docs/git2/Signature.luadoc | 54 +++ docs/git2/StrArray.luadoc | 43 ++ docs/git2/Tag.luadoc | 93 +++++ docs/git2/Tree.luadoc | 85 ++++ docs/git2/TreeEntry.luadoc | 41 ++ docs/index.html | 264 ++++++++++++ docs/luadoc.css | 286 +++++++++++++ docs/modules/Blob.html | 456 +++++++++++++++++++++ docs/modules/Commit.html | 661 ++++++++++++++++++++++++++++++ docs/modules/Config.html | 690 +++++++++++++++++++++++++++++++ docs/modules/Index.html | 757 +++++++++++++++++++++++++++++++++++ docs/modules/IndexEntry.html | 640 +++++++++++++++++++++++++++++ docs/modules/IndexEntryUnmerged.html | 270 +++++++++++++ docs/modules/ODB.html | 656 ++++++++++++++++++++++++++++++ docs/modules/ODBBackend.html | 202 ++++++++++ docs/modules/OID.html | 360 +++++++++++++++++ docs/modules/OID_Shorten.html | 251 ++++++++++++ docs/modules/Object.html | 342 ++++++++++++++++ docs/modules/OdbObject.html | 299 ++++++++++++++ docs/modules/Reference.html | 616 ++++++++++++++++++++++++++++ docs/modules/Repository.html | 668 +++++++++++++++++++++++++++++++ docs/modules/RevWalk.html | 428 ++++++++++++++++++++ docs/modules/Signature.html | 354 ++++++++++++++++ docs/modules/StrArray.html | 308 ++++++++++++++ docs/modules/Tag.html | 424 ++++++++++++++++++++ docs/modules/Tree.html | 411 +++++++++++++++++++ docs/modules/TreeEntry.html | 296 ++++++++++++++ docs/modules/git2.html | 202 ++++++++++ 44 files changed, 11744 insertions(+) create mode 100644 docs/git2.luadoc create mode 100644 docs/git2/Blob.luadoc create mode 100644 docs/git2/Commit.luadoc create mode 100644 docs/git2/Config.luadoc create mode 100644 docs/git2/Index.luadoc create mode 100644 docs/git2/IndexEntry.luadoc create mode 100644 docs/git2/IndexEntryUnmerged.luadoc create mode 100644 docs/git2/ODB.luadoc create mode 100644 docs/git2/ODBBackend.luadoc create mode 100644 docs/git2/OID.luadoc create mode 100644 docs/git2/OID_Shorten.luadoc create mode 100644 docs/git2/Object.luadoc create mode 100644 docs/git2/OdbObject.luadoc create mode 100644 docs/git2/Reference.luadoc create mode 100644 docs/git2/Repository.luadoc create mode 100644 docs/git2/RevWalk.luadoc create mode 100644 docs/git2/Signature.luadoc create mode 100644 docs/git2/StrArray.luadoc create mode 100644 docs/git2/Tag.luadoc create mode 100644 docs/git2/Tree.luadoc create mode 100644 docs/git2/TreeEntry.luadoc create mode 100644 docs/index.html create mode 100644 docs/luadoc.css create mode 100644 docs/modules/Blob.html create mode 100644 docs/modules/Commit.html create mode 100644 docs/modules/Config.html create mode 100644 docs/modules/Index.html create mode 100644 docs/modules/IndexEntry.html create mode 100644 docs/modules/IndexEntryUnmerged.html create mode 100644 docs/modules/ODB.html create mode 100644 docs/modules/ODBBackend.html create mode 100644 docs/modules/OID.html create mode 100644 docs/modules/OID_Shorten.html create mode 100644 docs/modules/Object.html create mode 100644 docs/modules/OdbObject.html create mode 100644 docs/modules/Reference.html create mode 100644 docs/modules/Repository.html create mode 100644 docs/modules/RevWalk.html create mode 100644 docs/modules/Signature.html create mode 100644 docs/modules/StrArray.html create mode 100644 docs/modules/Tag.html create mode 100644 docs/modules/Tree.html create mode 100644 docs/modules/TreeEntry.html create mode 100644 docs/modules/git2.html diff --git a/docs/git2.luadoc b/docs/git2.luadoc new file mode 100644 index 0000000..d0e5848 --- /dev/null +++ b/docs/git2.luadoc @@ -0,0 +1,37 @@ +-- +-- Warning: AUTOGENERATED DOCS. +-- + +--- Module git2. +-- +-- See libgit2 API docs. +-- +--
Class StrArray +--
Class Repository +--
Class Config +--
Class OdbObject +--
Class OID +--
Class OID_Shorten +--
Class ODB +--
Class ODBBackend +--
Class Index +--
Class IndexEntry +--
Class IndexEntryUnmerged +--
Class Object +--
Class Blob +--
Class Signature +--
Class Commit +--
Class Tree +--
Class TreeEntry +--
Class Tag +--
Class RevWalk +--
Class Reference +module("git2") + +--- module function. +-- +-- @return nil. +-- @name git2.version +function git2.version() +end + diff --git a/docs/git2/Blob.luadoc b/docs/git2/Blob.luadoc new file mode 100644 index 0000000..b694f46 --- /dev/null +++ b/docs/git2/Blob.luadoc @@ -0,0 +1,101 @@ +-- +-- Warning: AUTOGENERATED DOCS. +-- + +--- Class "Blob". +-- +-- Extends Object
+module("Blob") + +--- Create a new Blob object. +-- +--

Calls git_blob_lookup:

+-- @param repo the repo to use when locating the blob.. Must be of type Repository. +-- @param id identity of the blob to locate.. Must be of type OID. +-- @return Blob or nil on error. +-- @return Error string. +-- @name Blob.lookup +function Blob.lookup(repo, id) +end + +--- module function. +-- +--

Calls git_blob_create_fromfile:

+-- @param repo repository where the blob will be written. this repository cannot be bare. Must be of type Repository. +-- @param path file from which the blob will be created, relative to the repository's working dir. Must be of type string. +-- @return OID or nil on error. +-- @return Error string. +-- @name Blob.fromfile +function Blob.fromfile(repo, path) +end + +--- module function. +-- +--

Calls git_blob_create_frombuffer:

+-- @param repo repository where to blob will be written. Must be of type Repository. +-- @param buffer data to be written into the blob. Must be of type string. +-- @return OID or nil on error. +-- @return Error string. +-- @name Blob.frombuffer +function Blob.frombuffer(repo, buffer) +end + +--- object method. +-- +--

Calls git_blob_rawcontent:

A pointer to the raw content of a blob is returned; +-- this pointer is owned internally by the object and shall +-- not be free'd. The pointer may be invalidated at a later +-- time. +--

Calls git_blob_rawsize:

+-- @return string. +-- @name Blob:rawcontent +function Blob:rawcontent() +end + +--- object method. +-- +--

Calls git_blob_rawsize:

+-- @return integer. +-- @name Blob:rawsize +function Blob:rawsize() +end + +--- Destroy this object (will be called by Garbage Collector). +-- +--

Calls git_object_free:

This method instructs the library to close an existing +-- object; note that git_objects are owned and cached by the repository +-- so the object may or may not be freed after this library call, +-- depending on how agressive is the caching mechanism used +-- by the repository.

IMPORTANT: +-- It *is* necessary to call this method when you stop using +-- an object. Failure to do so will cause a memory leak. +-- @name Object:free +function Object:free() +end + +--- object method. +-- +--

Calls git_object_id:

+-- @return OID. +-- @name Object:id +function Object:id() +end + +--- object method. +-- +--

Calls git_object_type:

+-- @return string. +-- @name Object:type +function Object:type() +end + +--- object method. +-- +--

Calls git_object_owner:

Freeing or calling `git_repository_close` on the +-- returned pointer will invalidate the actual object.

Any other operation may be run on the repository without +-- affecting the object. +-- @return Repository. +-- @name Object:owner +function Object:owner() +end + diff --git a/docs/git2/Commit.luadoc b/docs/git2/Commit.luadoc new file mode 100644 index 0000000..436fb4a --- /dev/null +++ b/docs/git2/Commit.luadoc @@ -0,0 +1,160 @@ +-- +-- Warning: AUTOGENERATED DOCS. +-- + +--- Class "Commit". +-- +-- Extends Object
+module("Commit") + +--- Create a new Commit object. +-- +--

Calls git_commit_lookup:

+-- @param repo the repo to use when locating the commit.. Must be of type Repository. +-- @param id identity of the commit to locate. If the object is an annotated tag it will be peeled back to the commit.. Must be of type OID. +-- @return Commit or nil on error. +-- @return Error string. +-- @name Commit.lookup +function Commit.lookup(repo, id) +end + +--- module function. +-- +-- @param oid Must be of type OID. +-- @param repo Must be of type Repository. +-- @param update_ref Must be of type string. +-- @param author Must be of type Signature. +-- @param committer Must be of type Signature. +-- @param message_encoding Must be of type string. +-- @param message Must be of type string. +-- @param tree Must be of type Tree. +-- @param parent Must be of type Commit. +-- @return true if no error. +-- @return Error string. +-- @name Commit.create +function Commit.create(oid, repo, update_ref, author, committer, message_encoding, message, tree, parent) +end + +--- object method. +-- +--

Calls git_commit_id:

+-- @return OID. +-- @name Commit:id +function Commit:id() +end + +--- object method. +-- +--

Calls git_commit_message_encoding:

The encoding may be NULL if the `encoding` header +-- in the commit is missing; in that case UTF-8 is assumed. +-- @return string. +-- @name Commit:message_encoding +function Commit:message_encoding() +end + +--- object method. +-- +--

Calls git_commit_message:

+-- @return string. +-- @name Commit:message +function Commit:message() +end + +--- object method. +-- +--

Calls git_commit_time:

+-- @return integer. +-- @name Commit:time +function Commit:time() +end + +--- object method. +-- +--

Calls git_commit_time_offset:

+-- @return integer. +-- @name Commit:time_offset +function Commit:time_offset() +end + +--- object method. +-- +--

Calls git_commit_committer:

+-- @return Signature. +-- @name Commit:committer +function Commit:committer() +end + +--- object method. +-- +--

Calls git_commit_author:

+-- @return Signature. +-- @name Commit:author +function Commit:author() +end + +--- object method. +-- +--

Calls git_commit_tree:

+-- @return Tree or nil on error. +-- @return Error string. +-- @name Commit:tree +function Commit:tree() +end + +--- object method. +-- +--

Calls git_commit_parentcount:

+-- @return integer. +-- @name Commit:parentcount +function Commit:parentcount() +end + +--- object method. +-- +--

Calls git_commit_parent:

+-- @param n the position of the parent (from 0 to `parentcount`). Must be of type integer. +-- @return Commit or nil on error. +-- @return Error string. +-- @name Commit:parent +function Commit:parent(n) +end + +--- Destroy this object (will be called by Garbage Collector). +-- +--

Calls git_object_free:

This method instructs the library to close an existing +-- object; note that git_objects are owned and cached by the repository +-- so the object may or may not be freed after this library call, +-- depending on how agressive is the caching mechanism used +-- by the repository.

IMPORTANT: +-- It *is* necessary to call this method when you stop using +-- an object. Failure to do so will cause a memory leak. +-- @name Object:free +function Object:free() +end + +--- object method. +-- +--

Calls git_object_id:

+-- @return OID. +-- @name Object:id +function Object:id() +end + +--- object method. +-- +--

Calls git_object_type:

+-- @return string. +-- @name Object:type +function Object:type() +end + +--- object method. +-- +--

Calls git_object_owner:

Freeing or calling `git_repository_close` on the +-- returned pointer will invalidate the actual object.

Any other operation may be run on the repository without +-- affecting the object. +-- @return Repository. +-- @name Object:owner +function Object:owner() +end + diff --git a/docs/git2/Config.luadoc b/docs/git2/Config.luadoc new file mode 100644 index 0000000..37a53f4 --- /dev/null +++ b/docs/git2/Config.luadoc @@ -0,0 +1,147 @@ +-- +-- Warning: AUTOGENERATED DOCS. +-- + +--- Class "Config". +-- +module("Config") + +--- Create a new Config object. +-- +--

Calls git_config_new:

This object is empty, so you have to add a file to it before you +-- can do anything with it. +-- @return Config or nil on error. +-- @return Error string. +-- @name Config.new +function Config.new() +end + +--- Create a new Config object. +-- +--

Calls git_config_open_ondisk:

This method is a simple utility wrapper for the following sequence +-- of calls: +-- - git_config_new +-- - git_config_add_file_ondisk +-- @param path Path to the on-disk file to open. Must be of type string. +-- @return Config or nil on error. +-- @return Error string. +-- @name Config.open +function Config.open(path) +end + +--- Destroy this object (will be called by Garbage Collector). +-- +--

Calls git_config_free:

+-- @name Config:free +function Config:free() +end + +--- object method. +-- +--

Calls git_config_add_file_ondisk:

The on-disk file pointed at by `path` will be opened and +-- parsed; it's expected to be a native Git config file following +-- the default Git config syntax (see man git-config).

Note that the configuration object will free the file +-- automatically.

Further queries on this config object will access each +-- of the config file instances in order (instances with +-- a higher priority will be accessed first). +-- @param path path to the configuration file (backend) to add. Must be of type string. +-- @param priority the priority the backend should have. Must be of type integer. +-- @return true if no error. +-- @return Error string. +-- @name Config:add_file_ondisk +function Config:add_file_ondisk(path, priority) +end + +--- object method. +-- +-- @param name Must be of type string. +-- @return integer or nil on error. +-- @return Error string. +-- @name Config:get_int32 +function Config:get_int32(name) +end + +--- object method. +-- +-- @param name Must be of type string. +-- @param value Must be of type integer. +-- @return true if no error. +-- @return Error string. +-- @name Config:set_int32 +function Config:set_int32(name, value) +end + +--- object method. +-- +-- @param name Must be of type string. +-- @return integer or nil on error. +-- @return Error string. +-- @name Config:get_int64 +function Config:get_int64(name) +end + +--- object method. +-- +-- @param name Must be of type string. +-- @param value Must be of type integer. +-- @return true if no error. +-- @return Error string. +-- @name Config:set_int64 +function Config:set_int64(name, value) +end + +--- object method. +-- +--

Calls git_config_get_bool:

This function uses the usual C convention of 0 being false and +-- anything else true. +-- @param name the variable's name. Must be of type string. +-- @return boolean or nil on error. +-- @return Error string. +-- @name Config:get_bool +function Config:get_bool(name) +end + +--- object method. +-- +--

Calls git_config_set_bool:

+-- @param value the value to store. Must be of type boolean. +-- @param name the variable's name. Must be of type string. +-- @return true if no error. +-- @return Error string. +-- @name Config:set_bool +function Config:set_bool(value, name) +end + +--- object method. +-- +--

Calls git_config_get_string:

The string is owned by the variable and should not be freed by the +-- user. +-- @param name the variable's name. Must be of type string. +-- @return string or nil on error. +-- @return Error string. +-- @name Config:get_string +function Config:get_string(name) +end + +--- object method. +-- +--

Calls git_config_set_string:

A copy of the string is made and the user is free to use it +-- afterwards. +-- @param name the variable's name. Must be of type string. +-- @param value the string to store.. Must be of type string. +-- @return true if no error. +-- @return Error string. +-- @name Config:set_string +function Config:set_string(name, value) +end + +--- object method. +-- +--

Calls git_config_delete:

+-- @param name the variable to delete. Must be of type string. +-- @return true if no error. +-- @return Error string. +-- @name Config:delete +function Config:delete(name) +end + diff --git a/docs/git2/Index.luadoc b/docs/git2/Index.luadoc new file mode 100644 index 0000000..bfa51cc --- /dev/null +++ b/docs/git2/Index.luadoc @@ -0,0 +1,174 @@ +-- +-- Warning: AUTOGENERATED DOCS. +-- + +--- Class "Index". +-- +module("Index") + +--- Create a new Index object. +-- +--

Calls git_index_open:

Since there is no ODB or working directory behind this index, +-- any Index methods which rely on these (e.g. index_add) will +-- fail with the GIT_EBAREINDEX error code.

If you need to access the index of an actual repository, +-- use the `git_repository_index` wrapper.

The index must be freed once it's no longer in use. +-- @param index_path the path to the index file in disk. Must be of type string. +-- @return Index or nil on error. +-- @return Error string. +-- @name Index.bare +function Index.bare(index_path) +end + +--- object method. +-- +--

Calls git_index_clear:

+-- @name Index:clear +function Index:clear() +end + +--- object method. +-- +--

Calls git_index_read:

+-- @return true if no error. +-- @return Error string. +-- @name Index:read +function Index:read() +end + +--- object method. +-- +--

Calls git_index_write:

+-- @return true if no error. +-- @return Error string. +-- @name Index:write +function Index:write() +end + +--- object method. +-- +--

Calls git_index_find:

+-- @param path path to search. Must be of type string. +-- @return integer. +-- @name Index:find +function Index:find(path) +end + +--- object method. +-- +--

Calls git_index_uniq:

+-- @name Index:uniq +function Index:uniq() +end + +--- object method. +-- +--

Calls git_index_add:

The file `path` must be relative to the repository's +-- working folder and must be readable.

This method will fail in bare index instances.

This forces the file to be added to the index, not looking +-- at gitignore rules. Those rules can be evaluated through +-- the git_status APIs (in status.h) before calling this. +-- @param path filename to add. Must be of type string. +-- @param stage stage for the entry. Must be of type integer. +-- @return true if no error. +-- @return Error string. +-- @name Index:add +function Index:add(path, stage) +end + +--- object method. +-- +-- @param source_entry Must be of type IndexEntry. +-- @return true if no error. +-- @return Error string. +-- @name Index:add2 +function Index:add2(source_entry) +end + +--- object method. +-- +--

Calls git_index_append:

A new entry will always be inserted into the index; +-- if the index already contains an entry for such +-- path, the old entry will **not** be replaced.

The file `path` must be relative to the repository's +-- working folder and must be readable.

This method will fail in bare index instances. +-- @param path filename to add. Must be of type string. +-- @param stage stage for the entry. Must be of type integer. +-- @return true if no error. +-- @return Error string. +-- @name Index:append +function Index:append(path, stage) +end + +--- object method. +-- +-- @param source_entry Must be of type IndexEntry. +-- @return true if no error. +-- @return Error string. +-- @name Index:append2 +function Index:append2(source_entry) +end + +--- object method. +-- +--

Calls git_index_remove:

+-- @param position position of the entry to remove. Must be of type integer. +-- @return true if no error. +-- @return Error string. +-- @name Index:remove +function Index:remove(position) +end + +--- object method. +-- +--

Calls git_index_get:

This entry can be modified, and the changes will be written +-- back to disk on the next write() call.

The entry should not be freed by the caller. +-- @param n the position of the entry. Must be of type integer. +-- @return IndexEntry. +-- @name Index:get +function Index:get(n) +end + +--- object method. +-- +--

Calls git_index_entrycount:

+-- @return integer. +-- @name Index:entrycount +function Index:entrycount() +end + +--- object method. +-- +--

Calls git_index_entrycount_unmerged:

+-- @return integer. +-- @name Index:entrycount_unmerged +function Index:entrycount_unmerged() +end + +--- object method. +-- +--

Calls git_index_get_unmerged_bypath:

The returned entry is read-only and should not be modified +-- of freed by the caller. +-- @param path path to search. Must be of type string. +-- @return IndexEntryUnmerged. +-- @name Index:get_unmerged_bypath +function Index:get_unmerged_bypath(path) +end + +--- object method. +-- +--

Calls git_index_get_unmerged_byindex:

The returned entry is read-only and should not be modified +-- of freed by the caller. +-- @param n the position of the entry. Must be of type integer. +-- @return IndexEntryUnmerged. +-- @name Index:get_unmerged_byindex +function Index:get_unmerged_byindex(n) +end + +--- object method. +-- +--

Calls git_index_read_tree:

The current index contents will be replaced by the specified tree. +-- @param tree tree to read. Must be of type Tree. +-- @return true if no error. +-- @return Error string. +-- @name Index:read_tree +function Index:read_tree(tree) +end + diff --git a/docs/git2/IndexEntry.luadoc b/docs/git2/IndexEntry.luadoc new file mode 100644 index 0000000..8900db6 --- /dev/null +++ b/docs/git2/IndexEntry.luadoc @@ -0,0 +1,133 @@ +-- +-- Warning: AUTOGENERATED DOCS. +-- + +--- Class "IndexEntry". +-- +module("IndexEntry") + +--- Create a new IndexEntry object. +-- +-- @return IndexEntry. +-- @name IndexEntry.new +function IndexEntry.new() +end + +--- object method. +-- +--

Calls git_index_entry_stage:

This entry is calculated from the entrie's flag +-- attribute like this:

(entry->flags & GIT_IDXENTRY_STAGEMASK) >> GIT_IDXENTRY_STAGESHIFT

@returns the stage number +-- @return integer. +-- @name IndexEntry:stage +function IndexEntry:stage() +end + +--- object method. +-- +-- @return integer. +-- @return integer. +-- @name IndexEntry:ctime +function IndexEntry:ctime() +end + +--- object method. +-- +-- @param secs Must be of type integer. +-- @param nanosecs Must be of type integer. +-- @name IndexEntry:set_ctime +function IndexEntry:set_ctime(secs, nanosecs) +end + +--- object method. +-- +-- @return integer. +-- @return integer. +-- @name IndexEntry:mtime +function IndexEntry:mtime() +end + +--- object method. +-- +-- @param secs Must be of type integer. +-- @param nanosecs Must be of type integer. +-- @name IndexEntry:set_mtime +function IndexEntry:set_mtime(secs, nanosecs) +end + +--- object method. +-- +-- @return string. +-- @name IndexEntry:path +function IndexEntry:path() +end + +--- object method. +-- +-- @param val Must be of type string. +-- @name IndexEntry:set_path +function IndexEntry:set_path(val) +end + +--- object method. +-- +-- @return integer. +-- @name IndexEntry:dev +function IndexEntry:dev() +end + +--- object method. +-- +-- @return integer. +-- @name IndexEntry:ino +function IndexEntry:ino() +end + +--- object method. +-- +-- @return integer. +-- @name IndexEntry:mode +function IndexEntry:mode() +end + +--- object method. +-- +-- @return integer. +-- @name IndexEntry:uid +function IndexEntry:uid() +end + +--- object method. +-- +-- @return integer. +-- @name IndexEntry:gid +function IndexEntry:gid() +end + +--- object method. +-- +-- @return integer. +-- @name IndexEntry:file_size +function IndexEntry:file_size() +end + +--- object method. +-- +-- @return OID. +-- @name IndexEntry:oid +function IndexEntry:oid() +end + +--- object method. +-- +-- @return integer. +-- @name IndexEntry:flags +function IndexEntry:flags() +end + +--- object method. +-- +-- @return integer. +-- @name IndexEntry:flags_extended +function IndexEntry:flags_extended() +end + diff --git a/docs/git2/IndexEntryUnmerged.luadoc b/docs/git2/IndexEntryUnmerged.luadoc new file mode 100644 index 0000000..bc70e12 --- /dev/null +++ b/docs/git2/IndexEntryUnmerged.luadoc @@ -0,0 +1,31 @@ +-- +-- Warning: AUTOGENERATED DOCS. +-- + +--- Class "IndexEntryUnmerged". +-- +module("IndexEntryUnmerged") + +--- object method. +-- +-- @param idx Must be of type integer. +-- @return integer. +-- @name IndexEntryUnmerged:mode +function IndexEntryUnmerged:mode(idx) +end + +--- object method. +-- +-- @param idx Must be of type integer. +-- @return OID. +-- @name IndexEntryUnmerged:oid +function IndexEntryUnmerged:oid(idx) +end + +--- object method. +-- +-- @return string. +-- @name IndexEntryUnmerged:path +function IndexEntryUnmerged:path() +end + diff --git a/docs/git2/ODB.luadoc b/docs/git2/ODB.luadoc new file mode 100644 index 0000000..6e060ee --- /dev/null +++ b/docs/git2/ODB.luadoc @@ -0,0 +1,159 @@ +-- +-- Warning: AUTOGENERATED DOCS. +-- + +--- Class "ODB". +-- +module("ODB") + +--- Create a new ODB object. +-- +--

Calls git_odb_new:

Before the ODB can be used for read/writing, a custom database +-- backend must be manually added using `git_odb_add_backend()` +-- @return ODB or nil on error. +-- @return Error string. +-- @name ODB.new +function ODB.new() +end + +--- Create a new ODB object. +-- +--

Calls git_odb_open:

- git_odb_backend_loose: read and write loose object files +-- from disk, assuming `objects_dir` as the Objects folder

- git_odb_backend_pack: read objects from packfiles, +-- assuming `objects_dir` as the Objects folder which +-- contains a 'pack/' folder with the corresponding data +-- @param object_dir Must be of type string. +-- @return ODB or nil on error. +-- @return Error string. +-- @name ODB.open +function ODB.open(object_dir) +end + +--- Destroy this object (will be called by Garbage Collector). +-- +--

Calls git_odb_free:

+-- @name ODB:free +function ODB:free() +end + +--- object method. +-- +-- @param backend Must be of type ODBBackend. +-- @param priority Must be of type integer. +-- @return true if no error. +-- @return Error string. +-- @name ODB:add_backend +function ODB:add_backend(backend, priority) +end + +--- object method. +-- +-- @param backend Must be of type ODBBackend. +-- @param priority Must be of type integer. +-- @return true if no error. +-- @return Error string. +-- @name ODB:add_alternate +function ODB:add_alternate(backend, priority) +end + +--- object method. +-- +--

Calls git_odb_read:

This method queries all available ODB backends +-- trying to read the given OID.

The returned object is reference counted and +-- internally cached, so it should be closed +-- by the user once it's no longer in use.

@return +-- - 0 if the object was read; +-- - GIT_ENOTFOUND if the object is not in the database. +-- @param id identity of the object to read.. Must be of type OID. +-- @return OdbObject or nil on error. +-- @return Error string. +-- @name ODB:read +function ODB:read(id) +end + +--- object method. +-- +--

Calls git_odb_read_prefix:

This method queries all available ODB backends +-- trying to match the 'len' first hexadecimal +-- characters of the 'short_id'. +-- The remaining (GIT_OID_HEXSZ-len)*4 bits of +-- 'short_id' must be 0s. +-- 'len' must be at least GIT_OID_MINPREFIXLEN, +-- and the prefix must be long enough to identify +-- a unique object in all the backends; the +-- method will fail otherwise.

The returned object is reference counted and +-- internally cached, so it should be closed +-- by the user once it's no longer in use. +-- @param short_id a prefix of the id of the object to read.. Must be of type OID. +-- @param len the length of the prefix. Must be of type integer. +-- @return OdbObject or nil on error. +-- @return Error string. +-- @name ODB:read_prefix +function ODB:read_prefix(short_id, len) +end + +--- object method. +-- +--

Calls git_odb_read_header:

The header includes the length and the type of an object.

Note that most backends do not support reading only the header +-- of an object, so the whole object will be read and then the +-- header will be returned.

@return +-- - 0 if the object was read; +-- - GIT_ENOTFOUND if the object is not in the database. +-- @param id identity of the object to read.. Must be of type OID. +-- @return integer or nil on error. +-- @return string or nil on error. +-- @return Error string. +-- @name ODB:read_header +function ODB:read_header(id) +end + +--- object method. +-- +--

Calls git_odb_exists:

@return +-- - 1, if the object was found +-- - 0, otherwise +-- @param id the object to search for.. Must be of type OID. +-- @return true if no error. +-- @return Error string. +-- @name ODB:exists +function ODB:exists(id) +end + +--- object method. +-- +--

Calls git_odb_write:

This method writes a full object straight into the ODB. +-- For most cases, it is preferred to write objects through a write +-- stream, which is both faster and less memory intensive, specially +-- for big objects.

This method is provided for compatibility with custom backends +-- which are not able to support streaming writes +-- @param data buffer with the data to storr. Must be of type string. +-- @param type type of the data to store. Must be of type string. +-- @return OID or nil on error. +-- @return Error string. +-- @name ODB:write +function ODB:write(data, type) +end + +--- module function. +-- +--

Calls git_odb_hash:

The resulting SHA-1 OID will the itentifier for the data +-- buffer as if the data buffer it were to written to the ODB. +-- @param data data to hash. Must be of type string. +-- @param otype Must be of type integer. +-- @return OID or nil on error. +-- @return Error string. +-- @name ODB.hash +function ODB.hash(data, otype) +end + +--- module function. +-- +--

Calls git_odb_hashfile:

+-- @param path file to read and determine object id for. Must be of type string. +-- @param otype Must be of type integer. +-- @return OID or nil on error. +-- @return Error string. +-- @name ODB.hashfile +function ODB.hashfile(path, otype) +end + diff --git a/docs/git2/ODBBackend.luadoc b/docs/git2/ODBBackend.luadoc new file mode 100644 index 0000000..6823b2e --- /dev/null +++ b/docs/git2/ODBBackend.luadoc @@ -0,0 +1,15 @@ +-- +-- Warning: AUTOGENERATED DOCS. +-- + +--- Class "ODBBackend". +-- +module("ODBBackend") + +--- Create a new ODBBackend object. +-- +-- @return ODBBackend. +-- @name ODBBackend.new +function ODBBackend.new() +end + diff --git a/docs/git2/OID.luadoc b/docs/git2/OID.luadoc new file mode 100644 index 0000000..87e86a1 --- /dev/null +++ b/docs/git2/OID.luadoc @@ -0,0 +1,58 @@ +-- +-- Warning: AUTOGENERATED DOCS. +-- + +--- Class "OID". +-- +module("OID") + +--- Create a new OID object. +-- +--

Calls git_oid_fromstrn:

If N is odd, N-1 characters will be parsed instead. +-- The remaining space in the git_oid will be set to zero. +-- @param str input hex string of at least size `length`. Must be of type string. +-- @return OID or nil on error. +-- @return Error string. +-- @name OID.hex +function OID.hex(str) +end + +--- Create a new OID object. +-- +--

Calls git_oid_fromraw:

+-- @param raw the raw input bytes to be copied.. Must be of type string. +-- @return OID. +-- @name OID.raw +function OID.raw(raw) +end + +--- object method. +-- +-- @return string. +-- @name OID:pathfmt +function OID:pathfmt() +end + +--- object method. +-- +-- @return string. +-- @name OID:fmt +function OID:fmt() +end + +--- object meta method. +-- +-- @return string. +-- @name OID_mt:__tostring +function OID_mt:__tostring() +end + +--- object meta method. +-- +--

Calls git_oid_cmp:

+-- @param id Must be of type OID. +-- @return integer. +-- @name OID_mt:__eq +function OID_mt:__eq(id) +end + diff --git a/docs/git2/OID_Shorten.luadoc b/docs/git2/OID_Shorten.luadoc new file mode 100644 index 0000000..5311517 --- /dev/null +++ b/docs/git2/OID_Shorten.luadoc @@ -0,0 +1,36 @@ +-- +-- Warning: AUTOGENERATED DOCS. +-- + +--- Class "OID_Shorten". +-- +module("OID_Shorten") + +--- Create a new OID_Shorten object. +-- +--

Calls git_oid_shorten_new:

The OID shortener is used to process a list of OIDs +-- in text form and return the shortest length that would +-- uniquely identify all of them.

E.g. look at the result of `git log --abbrev`. +-- @param min_length The minimal length for all identifiers, which will be used even if shorter OIDs would still be unique.. Must be of type integer. +-- @return OID_Shorten. +-- @name OID_Shorten.new +function OID_Shorten.new(min_length) +end + +--- object method. +-- +--

Calls git_oid_shorten_add:

The OID is expected to be a 40-char hexadecimal string. +-- The OID is owned by the user and will not be modified +-- or freed.

For performance reasons, there is a hard-limit of how many +-- OIDs can be added to a single set (around ~22000, assuming +-- a mostly randomized distribution), which should be enough +-- for any kind of program, and keeps the algorithm fast and +-- memory-efficient.

Attempting to add more than those OIDs will result in a +-- GIT_ENOMEM error +-- @param text_oid an OID in text form. Must be of type string. +-- @return true if no error. +-- @return Error string. +-- @name OID_Shorten:add +function OID_Shorten:add(text_oid) +end + diff --git a/docs/git2/Object.luadoc b/docs/git2/Object.luadoc new file mode 100644 index 0000000..9af2cb6 --- /dev/null +++ b/docs/git2/Object.luadoc @@ -0,0 +1,63 @@ +-- +-- Warning: AUTOGENERATED DOCS. +-- + +--- Class "Object". +-- +module("Object") + +--- Destroy this object (will be called by Garbage Collector). +-- +--

Calls git_object_free:

This method instructs the library to close an existing +-- object; note that git_objects are owned and cached by the repository +-- so the object may or may not be freed after this library call, +-- depending on how agressive is the caching mechanism used +-- by the repository.

IMPORTANT: +-- It *is* necessary to call this method when you stop using +-- an object. Failure to do so will cause a memory leak. +-- @name Object:free +function Object:free() +end + +--- object method. +-- +--

Calls git_object_id:

+-- @return OID. +-- @name Object:id +function Object:id() +end + +--- object method. +-- +--

Calls git_object_type:

+-- @return string. +-- @name Object:type +function Object:type() +end + +--- object method. +-- +--

Calls git_object_owner:

Freeing or calling `git_repository_close` on the +-- returned pointer will invalidate the actual object.

Any other operation may be run on the repository without +-- affecting the object. +-- @return Repository. +-- @name Object:owner +function Object:owner() +end + +--- module function. +-- +-- @param otype Must be of type integer. +-- @return string. +-- @name Object.type2string +function Object.type2string(otype) +end + +--- module function. +-- +-- @param str Must be of type string. +-- @return integer. +-- @name Object.string2type +function Object.string2type(str) +end + diff --git a/docs/git2/OdbObject.luadoc b/docs/git2/OdbObject.luadoc new file mode 100644 index 0000000..b08dd12 --- /dev/null +++ b/docs/git2/OdbObject.luadoc @@ -0,0 +1,52 @@ +-- +-- Warning: AUTOGENERATED DOCS. +-- + +--- Class "OdbObject". +-- +module("OdbObject") + +--- Destroy this object (will be called by Garbage Collector). +-- +--

Calls git_odb_object_free:

This method must always be called once a `git_odb_object` is no +-- longer needed, otherwise memory will leak. +-- @name OdbObject:free +function OdbObject:free() +end + +--- object method. +-- +--

Calls git_odb_object_id:

This is the OID from which the object was read from +-- @return OID. +-- @name OdbObject:id +function OdbObject:id() +end + +--- object method. +-- +--

Calls git_odb_object_data:

This is the uncompressed, raw data as read from the ODB, +-- without the leading header.

This pointer is owned by the object and shall not be free'd. +--

Calls git_odb_object_size:

This is the real size of the `data` buffer, not the +-- actual size of the object. +-- @return string. +-- @name OdbObject:data +function OdbObject:data() +end + +--- object method. +-- +--

Calls git_odb_object_size:

This is the real size of the `data` buffer, not the +-- actual size of the object. +-- @return integer. +-- @name OdbObject:size +function OdbObject:size() +end + +--- object method. +-- +--

Calls git_odb_object_type:

+-- @return string. +-- @name OdbObject:type +function OdbObject:type() +end + 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. +-- +--

Calls git_reference_lookup:

The generated reference must be freed by the user. +-- @param repo the repository to look up the reference. Must be of type Repository. +-- @param name the long name for the reference (e.g. HEAD, ref/heads/master, refs/tags/v0.1.0, ...). Must be of type string. +-- @return Reference or nil on error. +-- @return Error string. +-- @name Reference.lookup +function Reference.lookup(repo, name) +end + +--- object method. +-- +--

Calls git_reference_oid:

Only available if the reference is direct (i.e. not symbolic) +-- @return OID. +-- @name Reference:oid +function Reference:oid() +end + +--- object method. +-- +--

Calls git_reference_set_oid:

The reference must be a direct reference, otherwise +-- this method will fail.

The reference will be automatically updated in +-- memory and on disk. +-- @param oid Must be of type OID. +-- @return true if no error. +-- @return Error string. +-- @name Reference:set_oid +function Reference:set_oid(oid) +end + +--- object method. +-- +--

Calls git_reference_target:

Only available if the reference is symbolic +-- @return string. +-- @name Reference:target +function Reference:target() +end + +--- object method. +-- +--

Calls git_reference_set_target:

The reference must be a symbolic reference, otherwise +-- this method will fail.

The reference will be automatically updated in +-- memory and on disk. +-- @param target The new target for the reference. Must be of type string. +-- @return true if no error. +-- @return Error string. +-- @name Reference:set_target +function Reference:set_target(target) +end + +--- object method. +-- +--

Calls git_reference_type:

Either direct (GIT_REF_OID) or symbolic (GIT_REF_SYMBOLIC) +-- @return integer. +-- @name Reference:type +function Reference:type() +end + +--- object method. +-- +--

Calls git_reference_name:

+-- @return string. +-- @name Reference:name +function Reference:name() +end + +--- object method. +-- +--

Calls git_reference_resolve:

Thie method iteratively peels a symbolic reference +-- until it resolves to a direct reference to an OID.

The peeled reference is returned in the `resolved_ref` +-- argument, and must be freed manually once it's no longer +-- needed.

If a direct reference is passed as an argument, +-- a copy of that reference is returned. This copy must +-- be manually freed too. +-- @return Reference or nil on error. +-- @return Error string. +-- @name Reference:resolve +function Reference:resolve() +end + +--- object method. +-- +--

Calls git_reference_owner:

+-- @return Repository. +-- @name Reference:owner +function Reference:owner() +end + +--- object method. +-- +--

Calls git_reference_rename:

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.

The given git_reference will be updated in place.

The reference will be immediately renamed in-memory +-- and on disk.

If the `force` flag is not enabled, and there's already +-- a reference with the given name, the renaming will fail.

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 string. +-- @param force Overwrite an existing reference. Must be of type boolean. +-- @return true if no error. +-- @return Error string. +-- @name Reference:rename +function Reference:rename(new_name, force) +end + +--- object method. +-- +--

Calls git_reference_delete:

This method works for both direct and symbolic references.

The reference will be immediately removed on disk and from +-- memory. The given reference pointer will no longer be valid. +-- @return true if no error. +-- @return Error string. +-- @name Reference:delete +function Reference:delete() +end + +--- module function. +-- +--

Calls git_reference_packall:

This method will load into the cache all the loose +-- references on the repository and update the +-- `packed-refs` file with them.

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 Repository. +-- @return true if no error. +-- @return Error string. +-- @name Reference.packall +function Reference.packall(repo) +end + +--- module function. +-- +-- @param repo Must be of type Repository. +-- @param list_flags Must be of type integer. +-- @return StrArray or nil on error. +-- @return Error string. +-- @name Reference.list +function Reference.list(repo, list_flags) +end + diff --git a/docs/git2/Repository.luadoc b/docs/git2/Repository.luadoc new file mode 100644 index 0000000..3be21a3 --- /dev/null +++ b/docs/git2/Repository.luadoc @@ -0,0 +1,177 @@ +-- +-- Warning: AUTOGENERATED DOCS. +-- + +--- Class "Repository". +-- +module("Repository") + +--- Create a new Repository object. +-- +--

Calls git_repository_open:

The 'path' argument must point to either a git repository +-- folder, or an existing work dir.

The method will automatically detect if 'path' is a normal +-- or bare repository or fail is 'path' is neither. +-- @param path the path to the repository. Must be of type string. +-- @return Repository or nil on error. +-- @return Error string. +-- @name Repository.open +function Repository.open(path) +end + +--- Create a new Repository object. +-- +--

Calls git_repository_init:

TODO: +-- - Reinit the repository +-- @param path the path to the repository. Must be of type string. +-- @param is_bare if true, a Git repository without a working directory is created at the pointed path. If false, provided path will be considered as the working directory into which the .git directory will be created.. Must be of type integer. +-- @return Repository or nil on error. +-- @return Error string. +-- @name Repository.init +function Repository.init(path, is_bare) +end + +--- object method. +-- +--

Calls git_repository_head:

+-- @return Reference or nil on error. +-- @return Error string. +-- @name Repository:head +function Repository:head() +end + +--- object method. +-- +--

Calls git_repository_head_detached:

A repository's HEAD is detached when it points directly to a commit +-- instead of a branch. +-- @return boolean. +-- @name Repository:head_detached +function Repository:head_detached() +end + +--- object method. +-- +--

Calls git_repository_head_orphan:

An orphan branch is one named from HEAD but which doesn't exist in +-- the refs namespace, because it doesn't have any commit to point to. +-- @return boolean. +-- @name Repository:head_orphan +function Repository:head_orphan() +end + +--- object method. +-- +--

Calls git_repository_is_empty:

An empty repository has just been initialized and contains +-- no commits. +-- @return boolean. +-- @name Repository:is_empty +function Repository:is_empty() +end + +--- object method. +-- +--

Calls git_repository_is_bare:

+-- @return boolean. +-- @name Repository:is_bare +function Repository:is_bare() +end + +--- object method. +-- +--

Calls git_repository_path:

This is the path of the `.git` folder for normal repositories, +-- or of the repository itself for bare repositories. +-- @return string. +-- @name Repository:path +function Repository:path() +end + +--- object method. +-- +--

Calls git_repository_workdir:

If the repository is bare, this function will always return +-- NULL. +-- @return string. +-- @name Repository:workdir +function Repository:workdir() +end + +--- object method. +-- +--

Calls git_repository_set_workdir:

The working directory doesn't need to be the same one +-- that contains the `.git` folder for this repository.

If this repository is bare, setting its working directory +-- will turn it into a normal repository, capable of performing +-- all the common workdir operations (checkout, status, index +-- manipulation, etc). +-- @param workdir The path to a working directory. Must be of type string. +-- @return true if no error. +-- @return Error string. +-- @name Repository:set_workdir +function Repository:set_workdir(workdir) +end + +--- object method. +-- +--

Calls git_repository_config:

If a configuration file has not been set, the default +-- config set for the repository will be returned, including +-- global and system configurations (if they are available).

The configuration file must be freed once it's no longer +-- being used by the user. +-- @return Config or nil on error. +-- @return Error string. +-- @name Repository:config +function Repository:config() +end + +--- object method. +-- +--

Calls git_repository_set_config:

This configuration file will be used for all configuration +-- queries involving this repository.

The repository will keep a reference to the config file; +-- the user must still free the config after setting it +-- to the repository, or it will leak. +-- @param config A Config object. Must be of type Config. +-- @name Repository:set_config +function Repository:set_config(config) +end + +--- object method. +-- +--

Calls git_repository_odb:

If a custom ODB has not been set, the default +-- database for the repository will be returned (the one +-- located in `.git/objects`).

The ODB must be freed once it's no longer being used by +-- the user. +-- @return ODB or nil on error. +-- @return Error string. +-- @name Repository:odb +function Repository:odb() +end + +--- object method. +-- +--

Calls git_repository_set_odb:

The ODB will be used for all object-related operations +-- involving this repository.

The repository will keep a reference to the ODB; the user +-- must still free the ODB object after setting it to the +-- repository, or it will leak. +-- @param odb An ODB object. Must be of type ODB. +-- @name Repository:set_odb +function Repository:set_odb(odb) +end + +--- object method. +-- +--

Calls git_repository_index:

If a custom index has not been set, the default +-- index for the repository will be returned (the one +-- located in `.git/index`).

The index must be freed once it's no longer being used by +-- the user. +-- @return Index or nil on error. +-- @return Error string. +-- @name Repository:index +function Repository:index() +end + +--- object method. +-- +--

Calls git_repository_set_index:

This index will be used for all index-related operations +-- involving this repository.

The repository will keep a reference to the index file; +-- the user must still free the index after setting it +-- to the repository, or it will leak. +-- @param index An index object. Must be of type Index. +-- @name Repository:set_index +function Repository:set_index(index) +end + diff --git a/docs/git2/RevWalk.luadoc b/docs/git2/RevWalk.luadoc new file mode 100644 index 0000000..c0c8794 --- /dev/null +++ b/docs/git2/RevWalk.luadoc @@ -0,0 +1,96 @@ +-- +-- Warning: AUTOGENERATED DOCS. +-- + +--- Class "RevWalk". +-- +module("RevWalk") + +--- Create a new RevWalk object. +-- +--

Calls git_revwalk_new:

This revision walker uses a custom memory pool and an internal +-- commit cache, so it is relatively expensive to allocate.

For maximum performance, this revision walker should be +-- reused for different walks.

This revision walker is *not* thread safe: it may only be +-- used to walk a repository on a single thread; however, +-- it is possible to have several revision walkers in +-- several different threads walking the same repository. +-- @param repo the repo to walk through. Must be of type Repository. +-- @return RevWalk or nil on error. +-- @return Error string. +-- @name RevWalk.new +function RevWalk.new(repo) +end + +--- Destroy this object (will be called by Garbage Collector). +-- +--

Calls git_revwalk_free:

+-- @name RevWalk:close +function RevWalk:close() +end + +--- object method. +-- +--

Calls git_revwalk_reset:

This will clear all the pushed and hidden commits, and +-- leave the walker in a blank state (just like at +-- creation) ready to receive new commit pushes and +-- start a new walk.

The revision walk is automatically reset when a walk +-- is over. +-- @name RevWalk:reset +function RevWalk:reset() +end + +--- object method. +-- +--

Calls git_revwalk_push:

The given OID must belong to a commit on the walked +-- repository.

The given commit will be used as one of the roots +-- when starting the revision walk. At least one commit +-- must be pushed the repository before a walk can +-- be started. +-- @param id Must be of type OID. +-- @return true if no error. +-- @return Error string. +-- @name RevWalk:push +function RevWalk:push(id) +end + +--- object method. +-- +--

Calls git_revwalk_hide:

The given OID must belong to a commit on the walked +-- repository.

The resolved commit and all its parents will be hidden from the +-- output on the revision walk. +-- @param id Must be of type OID. +-- @return true if no error. +-- @return Error string. +-- @name RevWalk:hide +function RevWalk:hide(id) +end + +--- object method. +-- +--

Calls git_revwalk_next:

The initial call to this method is *not* blocking when +-- iterating through a repo with a time-sorting mode.

Iterating with Topological or inverted modes makes the initial +-- call blocking to preprocess the commit list, but this block should be +-- mostly unnoticeable on most repositories (topological preprocessing +-- times at 0.3s on the git.git repo).

The revision walker is reset when the walk is over. +-- @return OID or nil on error. +-- @return Error string. +-- @name RevWalk:next +function RevWalk:next() +end + +--- object method. +-- +--

Calls git_revwalk_sorting:

Changing the sorting mode resets the walker. +-- @param sort_mode combination of GIT_SORT_XXX flags. Must be of type integer. +-- @name RevWalk:sorting +function RevWalk:sorting(sort_mode) +end + +--- object method. +-- +--

Calls git_revwalk_repository:

+-- @return Repository. +-- @name RevWalk:repository +function RevWalk:repository() +end + diff --git a/docs/git2/Signature.luadoc b/docs/git2/Signature.luadoc new file mode 100644 index 0000000..e8802f5 --- /dev/null +++ b/docs/git2/Signature.luadoc @@ -0,0 +1,54 @@ +-- +-- Warning: AUTOGENERATED DOCS. +-- + +--- Class "Signature". +-- +module("Signature") + +--- Create a new Signature object. +-- +--

Calls git_signature_new:

+-- @param name name of the person. Must be of type string. +-- @param email email of the person. Must be of type string. +-- @param time time when the action happened. Must be of type integer. +-- @param offset timezone offset in minutes for the time. Must be of type integer. +-- @return Signature or nil on error. +-- @return Error string. +-- @name Signature.new +function Signature.new(name, email, time, offset) +end + +--- Create a new Signature object. +-- +--

Calls git_signature_now:

+-- @param name name of the person. Must be of type string. +-- @param email email of the person. Must be of type string. +-- @return Signature or nil on error. +-- @return Error string. +-- @name Signature.now +function Signature.now(name, email) +end + +--- object method. +-- +-- @return string. +-- @name Signature:name +function Signature:name() +end + +--- object method. +-- +-- @return string. +-- @name Signature:email +function Signature:email() +end + +--- object method. +-- +-- @return integer. +-- @return integer. +-- @name Signature:when +function Signature:when() +end + diff --git a/docs/git2/StrArray.luadoc b/docs/git2/StrArray.luadoc new file mode 100644 index 0000000..1be8f9c --- /dev/null +++ b/docs/git2/StrArray.luadoc @@ -0,0 +1,43 @@ +-- +-- Warning: AUTOGENERATED DOCS. +-- + +--- Class "StrArray". +-- +module("StrArray") + +--- Create a new StrArray object. +-- +-- @return StrArray. +-- @name StrArray.new +function StrArray.new() +end + +--- Destroy this object (will be called by Garbage Collector). +-- +-- @name StrArray:free +function StrArray:free() +end + +--- object method. +-- +-- @param n Must be of type integer. +-- @return string. +-- @name StrArray:str +function StrArray:str(n) +end + +--- object method. +-- +-- @return nil. +-- @name StrArray:get_array +function StrArray:get_array() +end + +--- object method. +-- +-- @return integer. +-- @name StrArray:count +function StrArray:count() +end + diff --git a/docs/git2/Tag.luadoc b/docs/git2/Tag.luadoc new file mode 100644 index 0000000..653cc9e --- /dev/null +++ b/docs/git2/Tag.luadoc @@ -0,0 +1,93 @@ +-- +-- Warning: AUTOGENERATED DOCS. +-- + +--- Class "Tag". +-- +-- Extends Object
+module("Tag") + +--- Create a new Tag object. +-- +--

Calls git_tag_lookup:

+-- @param repo the repo to use when locating the tag.. Must be of type Repository. +-- @param id identity of the tag to locate.. Must be of type OID. +-- @return Tag or nil on error. +-- @return Error string. +-- @name Tag.lookup +function Tag.lookup(repo, id) +end + +--- object method. +-- +--

Calls git_tag_target:

This method performs a repository lookup for the +-- given object and returns it +-- @return Object or nil on error. +-- @return Error string. +-- @name Tag:target +function Tag:target() +end + +--- object method. +-- +--

Calls git_tag_name:

+-- @return string. +-- @name Tag:name +function Tag:name() +end + +--- object method. +-- +--

Calls git_tag_tagger:

+-- @return Signature. +-- @name Tag:tagger +function Tag:tagger() +end + +--- object method. +-- +--

Calls git_tag_message:

+-- @return string. +-- @name Tag:message +function Tag:message() +end + +--- Destroy this object (will be called by Garbage Collector). +-- +--

Calls git_object_free:

This method instructs the library to close an existing +-- object; note that git_objects are owned and cached by the repository +-- so the object may or may not be freed after this library call, +-- depending on how agressive is the caching mechanism used +-- by the repository.

IMPORTANT: +-- It *is* necessary to call this method when you stop using +-- an object. Failure to do so will cause a memory leak. +-- @name Object:free +function Object:free() +end + +--- object method. +-- +--

Calls git_object_id:

+-- @return OID. +-- @name Object:id +function Object:id() +end + +--- object method. +-- +--

Calls git_object_type:

+-- @return string. +-- @name Object:type +function Object:type() +end + +--- object method. +-- +--

Calls git_object_owner:

Freeing or calling `git_repository_close` on the +-- returned pointer will invalidate the actual object.

Any other operation may be run on the repository without +-- affecting the object. +-- @return Repository. +-- @name Object:owner +function Object:owner() +end + diff --git a/docs/git2/Tree.luadoc b/docs/git2/Tree.luadoc new file mode 100644 index 0000000..7f0831b --- /dev/null +++ b/docs/git2/Tree.luadoc @@ -0,0 +1,85 @@ +-- +-- Warning: AUTOGENERATED DOCS. +-- + +--- Class "Tree". +-- +-- Extends Object
+module("Tree") + +--- Create a new Tree object. +-- +--

Calls git_tree_lookup:

+-- @param repo the repo to use when locating the tree.. Must be of type Repository. +-- @param id identity of the tree to locate.. Must be of type OID. +-- @return Tree or nil on error. +-- @return Error string. +-- @name Tree.lookup +function Tree.lookup(repo, id) +end + +--- object method. +-- +--

Calls git_tree_entrycount:

+-- @return integer. +-- @name Tree:entrycount +function Tree:entrycount() +end + +--- object method. +-- +--

Calls git_tree_entry_byname:

+-- @param filename the filename of the desired entry. Must be of type string. +-- @return TreeEntry. +-- @name Tree:entry_byname +function Tree:entry_byname(filename) +end + +--- object method. +-- +--

Calls git_tree_entry_byindex:

+-- @param index Must be of type integer. +-- @return TreeEntry. +-- @name Tree:entry_byindex +function Tree:entry_byindex(index) +end + +--- Destroy this object (will be called by Garbage Collector). +-- +--

Calls git_object_free:

This method instructs the library to close an existing +-- object; note that git_objects are owned and cached by the repository +-- so the object may or may not be freed after this library call, +-- depending on how agressive is the caching mechanism used +-- by the repository.

IMPORTANT: +-- It *is* necessary to call this method when you stop using +-- an object. Failure to do so will cause a memory leak. +-- @name Object:free +function Object:free() +end + +--- object method. +-- +--

Calls git_object_id:

+-- @return OID. +-- @name Object:id +function Object:id() +end + +--- object method. +-- +--

Calls git_object_type:

+-- @return string. +-- @name Object:type +function Object:type() +end + +--- object method. +-- +--

Calls git_object_owner:

Freeing or calling `git_repository_close` on the +-- returned pointer will invalidate the actual object.

Any other operation may be run on the repository without +-- affecting the object. +-- @return Repository. +-- @name Object:owner +function Object:owner() +end + diff --git a/docs/git2/TreeEntry.luadoc b/docs/git2/TreeEntry.luadoc new file mode 100644 index 0000000..7fb85ea --- /dev/null +++ b/docs/git2/TreeEntry.luadoc @@ -0,0 +1,41 @@ +-- +-- Warning: AUTOGENERATED DOCS. +-- + +--- Class "TreeEntry". +-- +module("TreeEntry") + +--- object method. +-- +--

Calls git_tree_entry_name:

+-- @return string. +-- @name TreeEntry:name +function TreeEntry:name() +end + +--- object method. +-- +--

Calls git_tree_entry_attributes:

+-- @return integer. +-- @name TreeEntry:attributes +function TreeEntry:attributes() +end + +--- object method. +-- +-- @return OID. +-- @name TreeEntry:id +function TreeEntry:id() +end + +--- object method. +-- +--

Calls git_tree_entry_to_object:

@param object pointer to the converted object +-- @param repo repository where to lookup the pointed object. Must be of type Repository. +-- @return Object or nil on error. +-- @return Error string. +-- @name TreeEntry:object +function TreeEntry:object(repo) +end + diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..c6ed799 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,264 @@ + + + + Reference + + + + + +

+ +
+ +
+
+
+ +
+ + + +
+ + + +

Modules

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
BlobClass "Blob".
CommitClass "Commit".
ConfigClass "Config".
IndexClass "Index".
IndexEntryClass "IndexEntry".
IndexEntryUnmergedClass "IndexEntryUnmerged".
ODBClass "ODB".
ODBBackendClass "ODBBackend".
OIDClass "OID".
OID_ShortenClass "OID_Shorten".
ObjectClass "Object".
OdbObjectClass "OdbObject".
ReferenceClass "Reference".
RepositoryClass "Repository".
RevWalkClass "RevWalk".
SignatureClass "Signature".
StrArrayClass "StrArray".
TagClass "Tag".
TreeClass "Tree".
TreeEntryClass "TreeEntry".
git2Module git2.
+ + + + + + +
+ +
+ +
+

Valid XHTML 1.0!

+
+ +
+ + diff --git a/docs/luadoc.css b/docs/luadoc.css new file mode 100644 index 0000000..bc0f98a --- /dev/null +++ b/docs/luadoc.css @@ -0,0 +1,286 @@ +body { + margin-left: 1em; + margin-right: 1em; + font-family: arial, helvetica, geneva, sans-serif; + background-color:#ffffff; margin:0px; +} + +code { + font-family: "Andale Mono", monospace; +} + +tt { + font-family: "Andale Mono", monospace; +} + +body, td, th { font-size: 11pt; } + +h1, h2, h3, h4 { margin-left: 0em; } + +textarea, pre, tt { font-size:10pt; } +body, td, th { color:#000000; } +small { font-size:0.85em; } +h1 { font-size:1.5em; } +h2 { font-size:1.25em; } +h3 { font-size:1.15em; } +h4 { font-size:1.06em; } + +a:link { font-weight:bold; color: #004080; text-decoration: none; } +a:visited { font-weight:bold; color: #006699; text-decoration: none; } +a:link:hover { text-decoration:underline; } +hr { color:#cccccc } +img { border-width: 0px; } + + +h3 { padding-top: 1em; } + +p { margin-left: 1em; } + +p.name { + font-family: "Andale Mono", monospace; + padding-top: 1em; + margin-left: 0em; +} + +blockquote { margin-left: 3em; } + +pre.example { + background-color: rgb(245, 245, 245); + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-style: solid; + border-right-style: solid; + border-bottom-style: solid; + border-left-style: solid; + border-top-color: silver; + border-right-color: silver; + border-bottom-color: silver; + border-left-color: silver; + padding: 1em; + margin-left: 1em; + margin-right: 1em; + font-family: "Andale Mono", monospace; + font-size: smaller; +} + + +hr { + margin-left: 0em; + background: #00007f; + border: 0px; + height: 1px; +} + +ul { list-style-type: disc; } + +table.index { border: 1px #00007f; } +table.index td { text-align: left; vertical-align: top; } +table.index ul { padding-top: 0em; margin-top: 0em; } + +table { + border: 1px solid black; + border-collapse: collapse; + margin-left: auto; + margin-right: auto; +} +th { + border: 1px solid black; + padding: 0.5em; +} +td { + border: 1px solid black; + padding: 0.5em; +} +div.header, div.footer { margin-left: 0em; } + +#container +{ + margin-left: 1em; + margin-right: 1em; + background-color: #f0f0f0; +} + +#product +{ + text-align: center; + border-bottom: 1px solid #cccccc; + background-color: #ffffff; +} + +#product big { + font-size: 2em; +} + +#product_logo +{ +} + +#product_name +{ +} + +#product_description +{ +} + +#main +{ + background-color: #f0f0f0; + border-left: 2px solid #cccccc; +} + +#navigation +{ + float: left; + width: 18em; + margin: 0; + vertical-align: top; + background-color: #f0f0f0; + overflow:visible; +} + +#navigation h1 { + background-color:#e7e7e7; + font-size:1.1em; + color:#000000; + text-align:left; + margin:0px; + padding:0.2em; + border-top:1px solid #dddddd; + border-bottom:1px solid #dddddd; +} + +#navigation ul +{ + font-size:1em; + list-style-type: none; + padding: 0; + margin: 1px; +} + +#navigation li +{ + text-indent: -1em; + margin: 0em 0em 0em 0.5em; + display: block; + padding: 3px 0px 0px 12px; +} + +#navigation li li a +{ + padding: 0px 3px 0px -1em; +} + +#content +{ + margin-left: 18em; + padding: 1em; + border-left: 2px solid #cccccc; + border-right: 2px solid #cccccc; + background-color: #ffffff; +} + +#about +{ + clear: both; + margin: 0; + padding: 5px; + border-top: 2px solid #cccccc; + background-color: #ffffff; +} + +@media print { + body { + font: 12pt "Times New Roman", "TimeNR", Times, serif; + } + a { font-weight:bold; color: #004080; text-decoration: underline; } + + #main { background-color: #ffffff; border-left: 0px; } + #container { margin-left: 2%; margin-right: 2%; background-color: #ffffff; } + + #content { margin-left: 0px; padding: 1em; border-left: 0px; border-right: 0px; background-color: #ffffff; } + + #navigation { display: none; + } + pre.example { + font-family: "Andale Mono", monospace; + font-size: 10pt; + page-break-inside: avoid; + } +} + +table.module_list td +{ + border-width: 1px; + padding: 3px; + border-style: solid; + border-color: #cccccc; +} +table.module_list td.name { background-color: #f0f0f0; } +table.module_list td.summary { width: 100%; } + +table.file_list +{ + border-width: 1px; + border-style: solid; + border-color: #cccccc; + border-collapse: collapse; +} +table.file_list td +{ + border-width: 1px; + padding: 3px; + border-style: solid; + border-color: #cccccc; +} +table.file_list td.name { background-color: #f0f0f0; } +table.file_list td.summary { width: 100%; } + + +table.function_list +{ + border-width: 1px; + border-style: solid; + border-color: #cccccc; + border-collapse: collapse; +} +table.function_list td +{ + border-width: 1px; + padding: 3px; + border-style: solid; + border-color: #cccccc; +} +table.function_list td.name { background-color: #f0f0f0; } +table.function_list td.summary { width: 100%; } + + +table.table_list +{ + border-width: 1px; + border-style: solid; + border-color: #cccccc; + border-collapse: collapse; +} +table.table_list td +{ + border-width: 1px; + padding: 3px; + border-style: solid; + border-color: #cccccc; +} +table.table_list td.name { background-color: #f0f0f0; } +table.table_list td.summary { width: 100%; } + +dl.function dt {border-top: 1px solid #ccc; padding-top: 1em;} +dl.function dd {padding-bottom: 1em;} +dl.function h3 {padding: 0; margin: 0; font-size: medium;} + +dl.table dt {border-top: 1px solid #ccc; padding-top: 1em;} +dl.table dd {padding-bottom: 1em;} +dl.table h3 {padding: 0; margin: 0; font-size: medium;} + +#TODO: make module_list, file_list, function_list, table_list inherit from a list + diff --git a/docs/modules/Blob.html b/docs/modules/Blob.html new file mode 100644 index 0000000..5e01c97 --- /dev/null +++ b/docs/modules/Blob.html @@ -0,0 +1,456 @@ + + + + Reference + + + + + +
+ +
+ +
+
+
+ +
+ + + +
+ +

Module Blob

+ +

Class "Blob". Extends Object

+ + + + + +

Functions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Blob.frombuffer (repo, buffer)module function.
Blob.fromfile (repo, path)module function.
Blob.lookup (repo, id)Create a new Blob object.
Blob:rawcontent ()object method.
Blob:rawsize ()object method.
Object:free ()Destroy this object (will be called by Garbage Collector).
Object:id ()object method.
Object:owner ()object method.
Object:type ()object method.
+ + + + + + +
+
+ + + +

Functions

+
+ + + +
Blob.frombuffer (repo, buffer)
+
+module function.

Calls git_blob_create_frombuffer:

+ + +

Parameters

+
    + +
  • + repo: repository where to blob will be written. Must be of type Repository. +
  • + +
  • + buffer: data to be written into the blob. Must be of type string. +
  • + +
+ + + + + + +

Return values:

+
    + +
  1. OID or nil on error. + +
  2. Error string. + +
+ + + +
+ + + + +
Blob.fromfile (repo, path)
+
+module function.

Calls git_blob_create_fromfile:

+ + +

Parameters

+
    + +
  • + repo: repository where the blob will be written. this repository cannot be bare. Must be of type Repository. +
  • + +
  • + path: file from which the blob will be created, relative to the repository's working dir. Must be of type string. +
  • + +
+ + + + + + +

Return values:

+
    + +
  1. OID or nil on error. + +
  2. Error string. + +
+ + + +
+ + + + +
Blob.lookup (repo, id)
+
+Create a new Blob object.

Calls git_blob_lookup:

+ + +

Parameters

+
    + +
  • + repo: the repo to use when locating the blob.. Must be of type Repository. +
  • + +
  • + id: identity of the blob to locate.. Must be of type OID. +
  • + +
+ + + + + + +

Return values:

+
    + +
  1. Blob or nil on error. + +
  2. Error string. + +
+ + + +
+ + + + +
Blob:rawcontent ()
+
+object method.

Calls git_blob_rawcontent:

A pointer to the raw content of a blob is returned; this pointer is owned internally by the object and shall not be free'd. The pointer may be invalidated at a later time.

Calls git_blob_rawsize:

+ + + + + + + +

Return value:

+string. + + + +
+ + + + +
Blob:rawsize ()
+
+object method.

Calls git_blob_rawsize:

+ + + + + + + +

Return value:

+integer. + + + +
+ + + + +
Object:free ()
+
+Destroy this object (will be called by Garbage Collector).

Calls git_object_free:

This method instructs the library to close an existing object; note that git_objects are owned and cached by the repository so the object may or may not be freed after this library call, depending on how agressive is the caching mechanism used by the repository.

IMPORTANT: It *is* necessary to call this method when you stop using an object. Failure to do so will cause a memory leak. + + + + + + + + + +

+ + + + +
Object:id ()
+
+object method.

Calls git_object_id:

+ + + + + + + +

Return value:

+OID. + + + +
+ + + + +
Object:owner ()
+
+object method.

Calls git_object_owner:

Freeing or calling `git_repository_close` on the returned pointer will invalidate the actual object.

Any other operation may be run on the repository without affecting the object. + + + + + + + +

Return value:

+Repository. + + + +
+ + + + +
Object:type ()
+
+object method.

Calls git_object_type:

+ + + + + + + +

Return value:

+string. + + + +
+ + +
+ + + + + + +
+ +
+ +
+

Valid XHTML 1.0!

+
+ +
+ + diff --git a/docs/modules/Commit.html b/docs/modules/Commit.html new file mode 100644 index 0000000..ab884fb --- /dev/null +++ b/docs/modules/Commit.html @@ -0,0 +1,661 @@ + + + + Reference + + + + + +
+ +
+ +
+
+
+ +
+ + + +
+ +

Module Commit

+ +

Class "Commit". Extends Object

+ + + + + +

Functions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Commit.create (oid, repo, update_ref, author, committer, message_encoding, message, tree, parent)module function.
Commit.lookup (repo, id)Create a new Commit object.
Commit:author ()object method.
Commit:committer ()object method.
Commit:id ()object method.
Commit:message ()object method.
Commit:message_encoding ()object method.
Commit:parent (n)object method.
Commit:parentcount ()object method.
Commit:time ()object method.
Commit:time_offset ()object method.
Commit:tree ()object method.
Object:free ()Destroy this object (will be called by Garbage Collector).
Object:id ()object method.
Object:owner ()object method.
Object:type ()object method.
+ + + + + + +
+
+ + + +

Functions

+
+ + + +
Commit.create (oid, repo, update_ref, author, committer, message_encoding, message, tree, parent)
+
+module function. + + +

Parameters

+
    + +
  • + oid: Must be of type OID. +
  • + +
  • + repo: Must be of type Repository. +
  • + +
  • + update_ref: Must be of type string. +
  • + +
  • + author: Must be of type Signature. +
  • + +
  • + committer: Must be of type Signature. +
  • + +
  • + message_encoding: Must be of type string. +
  • + +
  • + message: Must be of type string. +
  • + +
  • + tree: Must be of type Tree. +
  • + +
  • + parent: Must be of type Commit. +
  • + +
+ + + + + + +

Return values:

+
    + +
  1. true if no error. + +
  2. Error string. + +
+ + + +
+ + + + +
Commit.lookup (repo, id)
+
+Create a new Commit object.

Calls git_commit_lookup:

+ + +

Parameters

+
    + +
  • + repo: the repo to use when locating the commit.. Must be of type Repository. +
  • + +
  • + id: identity of the commit to locate. If the object is an annotated tag it will be peeled back to the commit.. Must be of type OID. +
  • + +
+ + + + + + +

Return values:

+
    + +
  1. Commit or nil on error. + +
  2. Error string. + +
+ + + +
+ + + + +
Commit:author ()
+
+object method.

Calls git_commit_author:

+ + + + + + + +

Return value:

+Signature. + + + +
+ + + + +
Commit:committer ()
+
+object method.

Calls git_commit_committer:

+ + + + + + + +

Return value:

+Signature. + + + +
+ + + + +
Commit:id ()
+
+object method.

Calls git_commit_id:

+ + + + + + + +

Return value:

+OID. + + + +
+ + + + +
Commit:message ()
+
+object method.

Calls git_commit_message:

+ + + + + + + +

Return value:

+string. + + + +
+ + + + +
Commit:message_encoding ()
+
+object method.

Calls git_commit_message_encoding:

The encoding may be NULL if the `encoding` header in the commit is missing; in that case UTF-8 is assumed. + + + + + + + +

Return value:

+string. + + + +
+ + + + +
Commit:parent (n)
+
+object method.

Calls git_commit_parent:

+ + +

Parameters

+
    + +
  • + n: the position of the parent (from 0 to `parentcount`). Must be of type integer. +
  • + +
+ + + + + + +

Return values:

+
    + +
  1. Commit or nil on error. + +
  2. Error string. + +
+ + + +
+ + + + +
Commit:parentcount ()
+
+object method.

Calls git_commit_parentcount:

+ + + + + + + +

Return value:

+integer. + + + +
+ + + + +
Commit:time ()
+
+object method.

Calls git_commit_time:

+ + + + + + + +

Return value:

+integer. + + + +
+ + + + +
Commit:time_offset ()
+
+object method.

Calls git_commit_time_offset:

+ + + + + + + +

Return value:

+integer. + + + +
+ + + + +
Commit:tree ()
+
+object method.

Calls git_commit_tree:

+ + + + + + + +

Return values:

+
    + +
  1. Tree or nil on error. + +
  2. Error string. + +
+ + + +
+ + + + +
Object:free ()
+
+Destroy this object (will be called by Garbage Collector).

Calls git_object_free:

This method instructs the library to close an existing object; note that git_objects are owned and cached by the repository so the object may or may not be freed after this library call, depending on how agressive is the caching mechanism used by the repository.

IMPORTANT: It *is* necessary to call this method when you stop using an object. Failure to do so will cause a memory leak. + + + + + + + + + +

+ + + + +
Object:id ()
+
+object method.

Calls git_object_id:

+ + + + + + + +

Return value:

+OID. + + + +
+ + + + +
Object:owner ()
+
+object method.

Calls git_object_owner:

Freeing or calling `git_repository_close` on the returned pointer will invalidate the actual object.

Any other operation may be run on the repository without affecting the object. + + + + + + + +

Return value:

+Repository. + + + +
+ + + + +
Object:type ()
+
+object method.

Calls git_object_type:

+ + + + + + + +

Return value:

+string. + + + +
+ + +
+ + + + + + +
+ +
+ +
+

Valid XHTML 1.0!

+
+ +
+ + diff --git a/docs/modules/Config.html b/docs/modules/Config.html new file mode 100644 index 0000000..213b179 --- /dev/null +++ b/docs/modules/Config.html @@ -0,0 +1,690 @@ + + + + Reference + + + + + +
+ +
+ +
+
+
+ +
+ + + +
+ +

Module Config

+ +

Class "Config".

+ + + + + +

Functions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Config.new ()Create a new Config object.
Config.open (path)Create a new Config object.
Config:add_file_ondisk (path, priority)object method.
Config:delete (name)object method.
Config:free ()Destroy this object (will be called by Garbage Collector).
Config:get_bool (name)object method.
Config:get_int32 (name)object method.
Config:get_int64 (name)object method.
Config:get_string (name)object method.
Config:set_bool (value, name)object method.
Config:set_int32 (name, value)object method.
Config:set_int64 (name, value)object method.
Config:set_string (name, value)object method.
+ + + + + + +
+
+ + + +

Functions

+
+ + + +
Config.new ()
+
+Create a new Config object.

Calls git_config_new:

This object is empty, so you have to add a file to it before you can do anything with it. + + + + + + + +

Return values:

+
    + +
  1. Config or nil on error. + +
  2. Error string. + +
+ + + +
+ + + + +
Config.open (path)
+
+Create a new Config object.

Calls git_config_open_ondisk:

This method is a simple utility wrapper for the following sequence of calls: - git_config_new - git_config_add_file_ondisk + + +

Parameters

+
    + +
  • + path: Path to the on-disk file to open. Must be of type string. +
  • + +
+ + + + + + +

Return values:

+
    + +
  1. Config or nil on error. + +
  2. Error string. + +
+ + + +
+ + + + +
Config:add_file_ondisk (path, priority)
+
+object method.

Calls git_config_add_file_ondisk:

The on-disk file pointed at by `path` will be opened and parsed; it's expected to be a native Git config file following the default Git config syntax (see man git-config).

Note that the configuration object will free the file automatically.

Further queries on this config object will access each of the config file instances in order (instances with a higher priority will be accessed first). + + +

Parameters

+
    + +
  • + path: path to the configuration file (backend) to add. Must be of type string. +
  • + +
  • + priority: the priority the backend should have. Must be of type integer. +
  • + +
+ + + + + + +

Return values:

+
    + +
  1. true if no error. + +
  2. Error string. + +
+ + + +
+ + + + +
Config:delete (name)
+
+object method.

Calls git_config_delete:

+ + +

Parameters

+
    + +
  • + name: the variable to delete. Must be of type string. +
  • + +
+ + + + + + +

Return values:

+
    + +
  1. true if no error. + +
  2. Error string. + +
+ + + +
+ + + + +
Config:free ()
+
+Destroy this object (will be called by Garbage Collector).

Calls git_config_free:

+ + + + + + + + + +

+ + + + +
Config:get_bool (name)
+
+object method.

Calls git_config_get_bool:

This function uses the usual C convention of 0 being false and anything else true. + + +

Parameters

+
    + +
  • + name: the variable's name. Must be of type string. +
  • + +
+ + + + + + +

Return values:

+
    + +
  1. boolean or nil on error. + +
  2. Error string. + +
+ + + +
+ + + + +
Config:get_int32 (name)
+
+object method. + + +

Parameters

+
    + +
  • + name: Must be of type string. +
  • + +
+ + + + + + +

Return values:

+
    + +
  1. integer or nil on error. + +
  2. Error string. + +
+ + + +
+ + + + +
Config:get_int64 (name)
+
+object method. + + +

Parameters

+
    + +
  • + name: Must be of type string. +
  • + +
+ + + + + + +

Return values:

+
    + +
  1. integer or nil on error. + +
  2. Error string. + +
+ + + +
+ + + + +
Config:get_string (name)
+
+object method.

Calls git_config_get_string:

The string is owned by the variable and should not be freed by the user. + + +

Parameters

+
    + +
  • + name: the variable's name. Must be of type string. +
  • + +
+ + + + + + +

Return values:

+
    + +
  1. string or nil on error. + +
  2. Error string. + +
+ + + +
+ + + + +
Config:set_bool (value, name)
+
+object method.

Calls git_config_set_bool:

+ + +

Parameters

+
    + +
  • + value: the value to store. Must be of type boolean. +
  • + +
  • + name: the variable's name. Must be of type string. +
  • + +
+ + + + + + +

Return values:

+
    + +
  1. true if no error. + +
  2. Error string. + +
+ + + +
+ + + + +
Config:set_int32 (name, value)
+
+object method. + + +

Parameters

+
    + +
  • + name: Must be of type string. +
  • + +
  • + value: Must be of type integer. +
  • + +
+ + + + + + +

Return values:

+
    + +
  1. true if no error. + +
  2. Error string. + +
+ + + +
+ + + + +
Config:set_int64 (name, value)
+
+object method. + + +

Parameters

+
    + +
  • + name: Must be of type string. +
  • + +
  • + value: Must be of type integer. +
  • + +
+ + + + + + +

Return values:

+
    + +
  1. true if no error. + +
  2. Error string. + +
+ + + +
+ + + + +
Config:set_string (name, value)
+
+object method.

Calls git_config_set_string:

A copy of the string is made and the user is free to use it afterwards. + + +

Parameters

+
    + +
  • + name: the variable's name. Must be of type string. +
  • + +
  • + value: the string to store.. Must be of type string. +
  • + +
+ + + + + + +

Return values:

+
    + +
  1. true if no error. + +
  2. Error string. + +
+ + + +
+ + +
+ + + + + + +
+ +
+ +
+

Valid XHTML 1.0!

+
+ +
+ + diff --git a/docs/modules/Index.html b/docs/modules/Index.html new file mode 100644 index 0000000..8857b39 --- /dev/null +++ b/docs/modules/Index.html @@ -0,0 +1,757 @@ + + + + Reference + + + + + +
+ +
+ +
+
+
+ +
+ + + +
+ +

Module Index

+ +

Class "Index".

+ + + + + +

Functions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Index.bare (index_path)Create a new Index object.
Index:add (path, stage)object method.
Index:add2 (source_entry)object method.
Index:append (path, stage)object method.
Index:append2 (source_entry)object method.
Index:clear ()object method.
Index:entrycount ()object method.
Index:entrycount_unmerged ()object method.
Index:find (path)object method.
Index:get (n)object method.
Index:get_unmerged_byindex (n)object method.
Index:get_unmerged_bypath (path)object method.
Index:read ()object method.
Index:read_tree (tree)object method.
Index:remove (position)object method.
Index:uniq ()object method.
Index:write ()object method.
+ + + + + + +
+
+ + + +

Functions

+
+ + + +
Index.bare (index_path)
+
+Create a new Index object.

Calls git_index_open:

Since there is no ODB or working directory behind this index, any Index methods which rely on these (e.g. index_add) will fail with the GIT_EBAREINDEX error code.

If you need to access the index of an actual repository, use the `git_repository_index` wrapper.

The index must be freed once it's no longer in use. + + +

Parameters

+
    + +
  • + index_path: the path to the index file in disk. Must be of type string. +
  • + +
+ + + + + + +

Return values:

+
    + +
  1. Index or nil on error. + +
  2. Error string. + +
+ + + +
+ + + + +
Index:add (path, stage)
+
+object method.

Calls git_index_add:

The file `path` must be relative to the repository's working folder and must be readable.

This method will fail in bare index instances.

This forces the file to be added to the index, not looking at gitignore rules. Those rules can be evaluated through the git_status APIs (in status.h) before calling this. + + +

Parameters

+
    + +
  • + path: filename to add. Must be of type string. +
  • + +
  • + stage: stage for the entry. Must be of type integer. +
  • + +
+ + + + + + +

Return values:

+
    + +
  1. true if no error. + +
  2. Error string. + +
+ + + +
+ + + + +
Index:add2 (source_entry)
+
+object method. + + +

Parameters

+
    + +
  • + source_entry: Must be of type IndexEntry. +
  • + +
+ + + + + + +

Return values:

+
    + +
  1. true if no error. + +
  2. Error string. + +
+ + + +
+ + + + +
Index:append (path, stage)
+
+object method.

Calls git_index_append:

A new entry will always be inserted into the index; if the index already contains an entry for such path, the old entry will **not** be replaced.

The file `path` must be relative to the repository's working folder and must be readable.

This method will fail in bare index instances. + + +

Parameters

+
    + +
  • + path: filename to add. Must be of type string. +
  • + +
  • + stage: stage for the entry. Must be of type integer. +
  • + +
+ + + + + + +

Return values:

+
    + +
  1. true if no error. + +
  2. Error string. + +
+ + + +
+ + + + +
Index:append2 (source_entry)
+
+object method. + + +

Parameters

+
    + +
  • + source_entry: Must be of type IndexEntry. +
  • + +
+ + + + + + +

Return values:

+
    + +
  1. true if no error. + +
  2. Error string. + +
+ + + +
+ + + + +
Index:clear ()
+
+object method.

Calls git_index_clear:

+ + + + + + + + + +

+ + + + +
Index:entrycount ()
+
+object method.

Calls git_index_entrycount:

+ + + + + + + +

Return value:

+integer. + + + +
+ + + + +
Index:entrycount_unmerged ()
+
+object method.

Calls git_index_entrycount_unmerged:

+ + + + + + + +

Return value:

+integer. + + + +
+ + + + +
Index:find (path)
+
+object method.

Calls git_index_find:

+ + +

Parameters

+
    + +
  • + path: path to search. Must be of type string. +
  • + +
+ + + + + + +

Return value:

+integer. + + + +
+ + + + +
Index:get (n)
+
+object method.

Calls git_index_get:

This entry can be modified, and the changes will be written back to disk on the next write() call.

The entry should not be freed by the caller. + + +

Parameters

+
    + +
  • + n: the position of the entry. Must be of type integer. +
  • + +
+ + + + + + +

Return value:

+IndexEntry. + + + +
+ + + + +
Index:get_unmerged_byindex (n)
+
+object method.

Calls git_index_get_unmerged_byindex:

The returned entry is read-only and should not be modified of freed by the caller. + + +

Parameters

+
    + +
  • + n: the position of the entry. Must be of type integer. +
  • + +
+ + + + + + +

Return value:

+IndexEntryUnmerged. + + + +
+ + + + +
Index:get_unmerged_bypath (path)
+
+object method.

Calls git_index_get_unmerged_bypath:

The returned entry is read-only and should not be modified of freed by the caller. + + +

Parameters

+
    + +
  • + path: path to search. Must be of type string. +
  • + +
+ + + + + + +

Return value:

+IndexEntryUnmerged. + + + +
+ + + + +
Index:read ()
+
+object method.

Calls git_index_read:

+ + + + + + + +

Return values:

+
    + +
  1. true if no error. + +
  2. Error string. + +
+ + + +
+ + + + +
Index:read_tree (tree)
+
+object method.

Calls git_index_read_tree:

The current index contents will be replaced by the specified tree. + + +

Parameters

+
    + +
  • + tree: tree to read. Must be of type Tree. +
  • + +
+ + + + + + +

Return values:

+
    + +
  1. true if no error. + +
  2. Error string. + +
+ + + +
+ + + + +
Index:remove (position)
+
+object method.

Calls git_index_remove:

+ + +

Parameters

+
    + +
  • + position: position of the entry to remove. Must be of type integer. +
  • + +
+ + + + + + +

Return values:

+
    + +
  1. true if no error. + +
  2. Error string. + +
+ + + +
+ + + + +
Index:uniq ()
+
+object method.

Calls git_index_uniq:

+ + + + + + + + + +

+ + + + +
Index:write ()
+
+object method.

Calls git_index_write:

+ + + + + + + +

Return values:

+
    + +
  1. true if no error. + +
  2. Error string. + +
+ + + +
+ + +
+ + + + + + +
+ +
+ +
+

Valid XHTML 1.0!

+
+ +
+ + diff --git a/docs/modules/IndexEntry.html b/docs/modules/IndexEntry.html new file mode 100644 index 0000000..4ff440e --- /dev/null +++ b/docs/modules/IndexEntry.html @@ -0,0 +1,640 @@ + + + + Reference + + + + + +
+ +
+ +
+
+
+ +
+ + + +
+ +

Module IndexEntry

+ +

Class "IndexEntry".

+ + + + + +

Functions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
IndexEntry.new ()Create a new IndexEntry object.
IndexEntry:ctime ()object method.
IndexEntry:dev ()object method.
IndexEntry:file_size ()object method.
IndexEntry:flags ()object method.
IndexEntry:flags_extended ()object method.
IndexEntry:gid ()object method.
IndexEntry:ino ()object method.
IndexEntry:mode ()object method.
IndexEntry:mtime ()object method.
IndexEntry:oid ()object method.
IndexEntry:path ()object method.
IndexEntry:set_ctime (secs, nanosecs)object method.
IndexEntry:set_mtime (secs, nanosecs)object method.
IndexEntry:set_path (val)object method.
IndexEntry:stage ()object method.
IndexEntry:uid ()object method.
+ + + + + + +
+
+ + + +

Functions

+
+ + + +
IndexEntry.new ()
+
+Create a new IndexEntry object. + + + + + + + +

Return value:

+IndexEntry. + + + +
+ + + + +
IndexEntry:ctime ()
+
+object method. + + + + + + + +

Return values:

+
    + +
  1. integer. + +
  2. integer. + +
+ + + +
+ + + + +
IndexEntry:dev ()
+
+object method. + + + + + + + +

Return value:

+integer. + + + +
+ + + + +
IndexEntry:file_size ()
+
+object method. + + + + + + + +

Return value:

+integer. + + + +
+ + + + +
IndexEntry:flags ()
+
+object method. + + + + + + + +

Return value:

+integer. + + + +
+ + + + +
IndexEntry:flags_extended ()
+
+object method. + + + + + + + +

Return value:

+integer. + + + +
+ + + + +
IndexEntry:gid ()
+
+object method. + + + + + + + +

Return value:

+integer. + + + +
+ + + + +
IndexEntry:ino ()
+
+object method. + + + + + + + +

Return value:

+integer. + + + +
+ + + + +
IndexEntry:mode ()
+
+object method. + + + + + + + +

Return value:

+integer. + + + +
+ + + + +
IndexEntry:mtime ()
+
+object method. + + + + + + + +

Return values:

+
    + +
  1. integer. + +
  2. integer. + +
+ + + +
+ + + + +
IndexEntry:oid ()
+
+object method. + + + + + + + +

Return value:

+OID. + + + +
+ + + + +
IndexEntry:path ()
+
+object method. + + + + + + + +

Return value:

+string. + + + +
+ + + + +
IndexEntry:set_ctime (secs, nanosecs)
+
+object method. + + +

Parameters

+
    + +
  • + secs: Must be of type integer. +
  • + +
  • + nanosecs: Must be of type integer. +
  • + +
+ + + + + + + + +
+ + + + +
IndexEntry:set_mtime (secs, nanosecs)
+
+object method. + + +

Parameters

+
    + +
  • + secs: Must be of type integer. +
  • + +
  • + nanosecs: Must be of type integer. +
  • + +
+ + + + + + + + +
+ + + + +
IndexEntry:set_path (val)
+
+object method. + + +

Parameters

+
    + +
  • + val: Must be of type string. +
  • + +
+ + + + + + + + +
+ + + + +
IndexEntry:stage ()
+
+object method.

Calls git_index_entry_stage:

This entry is calculated from the entrie's flag + + + + + + + +

Return value:

+integer. + + + +
+ + + + +
IndexEntry:uid ()
+
+object method. + + + + + + + +

Return value:

+integer. + + + +
+ + +
+ + + + + + +
+ +
+ +
+

Valid XHTML 1.0!

+
+ +
+ + diff --git a/docs/modules/IndexEntryUnmerged.html b/docs/modules/IndexEntryUnmerged.html new file mode 100644 index 0000000..e8e5b22 --- /dev/null +++ b/docs/modules/IndexEntryUnmerged.html @@ -0,0 +1,270 @@ + + + + Reference + + + + + +
+ +
+ +
+
+
+ +
+ + + +
+ +

Module IndexEntryUnmerged

+ +

Class "IndexEntryUnmerged".

+ + + + + +

Functions

+ + + + + + + + + + + + + + + + + +
IndexEntryUnmerged:mode (idx)object method.
IndexEntryUnmerged:oid (idx)object method.
IndexEntryUnmerged:path ()object method.
+ + + + + + +
+
+ + + +

Functions

+
+ + + +
IndexEntryUnmerged:mode (idx)
+
+object method. + + +

Parameters

+
    + +
  • + idx: Must be of type integer. +
  • + +
+ + + + + + +

Return value:

+integer. + + + +
+ + + + +
IndexEntryUnmerged:oid (idx)
+
+object method. + + +

Parameters

+
    + +
  • + idx: Must be of type integer. +
  • + +
+ + + + + + +

Return value:

+OID. + + + +
+ + + + +
IndexEntryUnmerged:path ()
+
+object method. + + + + + + + +

Return value:

+string. + + + +
+ + +
+ + + + + + +
+ +
+ +
+

Valid XHTML 1.0!

+
+ +
+ + diff --git a/docs/modules/ODB.html b/docs/modules/ODB.html new file mode 100644 index 0000000..1076315 --- /dev/null +++ b/docs/modules/ODB.html @@ -0,0 +1,656 @@ + + + + Reference + + + + + +
+ +
+ +
+
+
+ +
+ + + +
+ +

Module ODB

+ +

Class "ODB".

+ + + + + +

Functions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ODB.hash (data, otype)module function.
ODB.hashfile (path, otype)module function.
ODB.new ()Create a new ODB object.
ODB.open (object_dir)Create a new ODB object.
ODB:add_alternate (backend, priority)object method.
ODB:add_backend (backend, priority)object method.
ODB:exists (id)object method.
ODB:free ()Destroy this object (will be called by Garbage Collector).
ODB:read (id)object method.
ODB:read_header (id)object method.
ODB:read_prefix (short_id, len)object method.
ODB:write (data, type)object method.
+ + + + + + +
+
+ + + +

Functions

+
+ + + +
ODB.hash (data, otype)
+
+module function.

Calls git_odb_hash:

The resulting SHA-1 OID will the itentifier for the data buffer as if the data buffer it were to written to the ODB. + + +

Parameters

+
    + +
  • + data: data to hash. Must be of type string. +
  • + +
  • + otype: Must be of type integer. +
  • + +
+ + + + + + +

Return values:

+
    + +
  1. OID or nil on error. + +
  2. Error string. + +
+ + + +
+ + + + +
ODB.hashfile (path, otype)
+
+module function.

Calls git_odb_hashfile:

+ + +

Parameters

+
    + +
  • + path: file to read and determine object id for. Must be of type string. +
  • + +
  • + otype: Must be of type integer. +
  • + +
+ + + + + + +

Return values:

+
    + +
  1. OID or nil on error. + +
  2. Error string. + +
+ + + +
+ + + + +
ODB.new ()
+
+Create a new ODB object.

Calls git_odb_new:

Before the ODB can be used for read/writing, a custom database backend must be manually added using `git_odb_add_backend()` + + + + + + + +

Return values:

+
    + +
  1. ODB or nil on error. + +
  2. Error string. + +
+ + + +
+ + + + +
ODB.open (object_dir)
+
+Create a new ODB object.

Calls git_odb_open:

- git_odb_backend_loose: read and write loose object files from disk, assuming `objects_dir` as the Objects folder

- git_odb_backend_pack: read objects from packfiles, assuming `objects_dir` as the Objects folder which contains a 'pack/' folder with the corresponding data + + +

Parameters

+
    + +
  • + object_dir: Must be of type string. +
  • + +
+ + + + + + +

Return values:

+
    + +
  1. ODB or nil on error. + +
  2. Error string. + +
+ + + +
+ + + + +
ODB:add_alternate (backend, priority)
+
+object method. + + +

Parameters

+
    + +
  • + backend: Must be of type ODBBackend. +
  • + +
  • + priority: Must be of type integer. +
  • + +
+ + + + + + +

Return values:

+
    + +
  1. true if no error. + +
  2. Error string. + +
+ + + +
+ + + + +
ODB:add_backend (backend, priority)
+
+object method. + + +

Parameters

+
    + +
  • + backend: Must be of type ODBBackend. +
  • + +
  • + priority: Must be of type integer. +
  • + +
+ + + + + + +

Return values:

+
    + +
  1. true if no error. + +
  2. Error string. + +
+ + + +
+ + + + +
ODB:exists (id)
+
+object method.

Calls git_odb_exists:

@return - 1, if the object was found - 0, otherwise + + +

Parameters

+
    + +
  • + id: the object to search for.. Must be of type OID. +
  • + +
+ + + + + + +

Return values:

+
    + +
  1. true if no error. + +
  2. Error string. + +
+ + + +
+ + + + +
ODB:free ()
+
+Destroy this object (will be called by Garbage Collector).

Calls git_odb_free:

+ + + + + + + + + +

+ + + + +
ODB:read (id)
+
+object method.

Calls git_odb_read:

This method queries all available ODB backends trying to read the given OID.

The returned object is reference counted and internally cached, so it should be closed by the user once it's no longer in use.

@return - 0 if the object was read; - GIT_ENOTFOUND if the object is not in the database. + + +

Parameters

+
    + +
  • + id: identity of the object to read.. Must be of type OID. +
  • + +
+ + + + + + +

Return values:

+
    + +
  1. OdbObject or nil on error. + +
  2. Error string. + +
+ + + +
+ + + + +
ODB:read_header (id)
+
+object method.

Calls git_odb_read_header:

The header includes the length and the type of an object.

Note that most backends do not support reading only the header of an object, so the whole object will be read and then the header will be returned.

@return - 0 if the object was read; - GIT_ENOTFOUND if the object is not in the database. + + +

Parameters

+
    + +
  • + id: identity of the object to read.. Must be of type OID. +
  • + +
+ + + + + + +

Return values:

+
    + +
  1. integer or nil on error. + +
  2. string or nil on error. + +
  3. Error string. + +
+ + + +
+ + + + +
ODB:read_prefix (short_id, len)
+
+object method.

Calls git_odb_read_prefix:

This method queries all available ODB backends trying to match the 'len' first hexadecimal characters of the 'short_id'. The remaining (GIT_OID_HEXSZ-len)*4 bits of 'short_id' must be 0s. 'len' must be at least GIT_OID_MINPREFIXLEN, and the prefix must be long enough to identify a unique object in all the backends; the method will fail otherwise.

The returned object is reference counted and internally cached, so it should be closed by the user once it's no longer in use. + + +

Parameters

+
    + +
  • + short_id: a prefix of the id of the object to read.. Must be of type OID. +
  • + +
  • + len: the length of the prefix. Must be of type integer. +
  • + +
+ + + + + + +

Return values:

+
    + +
  1. OdbObject or nil on error. + +
  2. Error string. + +
+ + + +
+ + + + +
ODB:write (data, type)
+
+object method.

Calls git_odb_write:

This method writes a full object straight into the ODB. For most cases, it is preferred to write objects through a write stream, which is both faster and less memory intensive, specially for big objects.

This method is provided for compatibility with custom backends which are not able to support streaming writes + + +

Parameters

+
    + +
  • + data: buffer with the data to storr. Must be of type string. +
  • + +
  • + type: type of the data to store. Must be of type string. +
  • + +
+ + + + + + +

Return values:

+
    + +
  1. OID or nil on error. + +
  2. Error string. + +
+ + + +
+ + +
+ + + + + + +
+ +
+ +
+

Valid XHTML 1.0!

+
+ +
+ + diff --git a/docs/modules/ODBBackend.html b/docs/modules/ODBBackend.html new file mode 100644 index 0000000..3d1dfbc --- /dev/null +++ b/docs/modules/ODBBackend.html @@ -0,0 +1,202 @@ + + + + Reference + + + + + +
+ +
+ +
+
+
+ +
+ + + +
+ +

Module ODBBackend

+ +

Class "ODBBackend".

+ + + + + +

Functions

+ + + + + + + +
ODBBackend.new ()Create a new ODBBackend object.
+ + + + + + +
+
+ + + +

Functions

+
+ + + +
ODBBackend.new ()
+
+Create a new ODBBackend object. + + + + + + + +

Return value:

+ODBBackend. + + + +
+ + +
+ + + + + + +
+ +
+ +
+

Valid XHTML 1.0!

+
+ +
+ + diff --git a/docs/modules/OID.html b/docs/modules/OID.html new file mode 100644 index 0000000..4e86584 --- /dev/null +++ b/docs/modules/OID.html @@ -0,0 +1,360 @@ + + + + Reference + + + + + +
+ +
+ +
+
+
+ +
+ + + +
+ +

Module OID

+ +

Class "OID".

+ + + + + +

Functions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OID.hex (str)Create a new OID object.
OID.raw (raw)Create a new OID object.
OID:fmt ()object method.
OID:pathfmt ()object method.
OID_mt:__eq (id)object meta method.
OID_mt:__tostring ()object meta method.
+ + + + + + +
+
+ + + +

Functions

+
+ + + +
OID.hex (str)
+
+Create a new OID object.

Calls git_oid_fromstrn:

If N is odd, N-1 characters will be parsed instead. The remaining space in the git_oid will be set to zero. + + +

Parameters

+
    + +
  • + str: input hex string of at least size `length`. Must be of type string. +
  • + +
+ + + + + + +

Return values:

+
    + +
  1. OID or nil on error. + +
  2. Error string. + +
+ + + +
+ + + + +
OID.raw (raw)
+
+Create a new OID object.

Calls git_oid_fromraw:

+ + +

Parameters

+
    + +
  • + raw: the raw input bytes to be copied.. Must be of type string. +
  • + +
+ + + + + + +

Return value:

+OID. + + + +
+ + + + +
OID:fmt ()
+
+object method. + + + + + + + +

Return value:

+string. + + + +
+ + + + +
OID:pathfmt ()
+
+object method. + + + + + + + +

Return value:

+string. + + + +
+ + + + +
OID_mt:__eq (id)
+
+object meta method.

Calls git_oid_cmp:

+ + +

Parameters

+
    + +
  • + id: Must be of type OID. +
  • + +
+ + + + + + +

Return value:

+integer. + + + +
+ + + + +
OID_mt:__tostring ()
+
+object meta method. + + + + + + + +

Return value:

+string. + + + +
+ + +
+ + + + + + +
+ +
+ +
+

Valid XHTML 1.0!

+
+ +
+ + diff --git a/docs/modules/OID_Shorten.html b/docs/modules/OID_Shorten.html new file mode 100644 index 0000000..07467a7 --- /dev/null +++ b/docs/modules/OID_Shorten.html @@ -0,0 +1,251 @@ + + + + Reference + + + + + +
+ +
+ +
+
+
+ +
+ + + +
+ +

Module OID_Shorten

+ +

Class "OID_Shorten".

+ + + + + +

Functions

+ + + + + + + + + + + + +
OID_Shorten.new (min_length)Create a new OID_Shorten object.
OID_Shorten:add (text_oid)object method.
+ + + + + + +
+
+ + + +

Functions

+
+ + + +
OID_Shorten.new (min_length)
+
+Create a new OID_Shorten object.

Calls git_oid_shorten_new:

The OID shortener is used to process a list of OIDs in text form and return the shortest length that would uniquely identify all of them.

E.g. look at the result of `git log --abbrev`. + + +

Parameters

+
    + +
  • + min_length: The minimal length for all identifiers, which will be used even if shorter OIDs would still be unique.. Must be of type integer. +
  • + +
+ + + + + + +

Return value:

+OID_Shorten. + + + +
+ + + + +
OID_Shorten:add (text_oid)
+
+object method.

Calls git_oid_shorten_add:

The OID is expected to be a 40-char hexadecimal string. The OID is owned by the user and will not be modified or freed.

For performance reasons, there is a hard-limit of how many OIDs can be added to a single set (around ~22000, assuming a mostly randomized distribution), which should be enough for any kind of program, and keeps the algorithm fast and memory-efficient.

Attempting to add more than those OIDs will result in a GIT_ENOMEM error + + +

Parameters

+
    + +
  • + text_oid: an OID in text form. Must be of type string. +
  • + +
+ + + + + + +

Return values:

+
    + +
  1. true if no error. + +
  2. Error string. + +
+ + + +
+ + +
+ + + + + + +
+ +
+ +
+

Valid XHTML 1.0!

+
+ +
+ + diff --git a/docs/modules/Object.html b/docs/modules/Object.html new file mode 100644 index 0000000..87ef26e --- /dev/null +++ b/docs/modules/Object.html @@ -0,0 +1,342 @@ + + + + Reference + + + + + +
+ +
+ +
+
+
+ +
+ + + +
+ +

Module Object

+ +

Class "Object".

+ + + + + +

Functions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Object.string2type (str)module function.
Object.type2string (otype)module function.
Object:free ()Destroy this object (will be called by Garbage Collector).
Object:id ()object method.
Object:owner ()object method.
Object:type ()object method.
+ + + + + + +
+
+ + + +

Functions

+
+ + + +
Object.string2type (str)
+
+module function. + + +

Parameters

+
    + +
  • + str: Must be of type string. +
  • + +
+ + + + + + +

Return value:

+integer. + + + +
+ + + + +
Object.type2string (otype)
+
+module function. + + +

Parameters

+
    + +
  • + otype: Must be of type integer. +
  • + +
+ + + + + + +

Return value:

+string. + + + +
+ + + + +
Object:free ()
+
+Destroy this object (will be called by Garbage Collector).

Calls git_object_free:

This method instructs the library to close an existing object; note that git_objects are owned and cached by the repository so the object may or may not be freed after this library call, depending on how agressive is the caching mechanism used by the repository.

IMPORTANT: It *is* necessary to call this method when you stop using an object. Failure to do so will cause a memory leak. + + + + + + + + + +

+ + + + +
Object:id ()
+
+object method.

Calls git_object_id:

+ + + + + + + +

Return value:

+OID. + + + +
+ + + + +
Object:owner ()
+
+object method.

Calls git_object_owner:

Freeing or calling `git_repository_close` on the returned pointer will invalidate the actual object.

Any other operation may be run on the repository without affecting the object. + + + + + + + +

Return value:

+Repository. + + + +
+ + + + +
Object:type ()
+
+object method.

Calls git_object_type:

+ + + + + + + +

Return value:

+string. + + + +
+ + +
+ + + + + + +
+ +
+ +
+

Valid XHTML 1.0!

+
+ +
+ + diff --git a/docs/modules/OdbObject.html b/docs/modules/OdbObject.html new file mode 100644 index 0000000..971953a --- /dev/null +++ b/docs/modules/OdbObject.html @@ -0,0 +1,299 @@ + + + + Reference + + + + + +
+ +
+ +
+
+
+ +
+ + + +
+ +

Module OdbObject

+ +

Class "OdbObject".

+ + + + + +

Functions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
OdbObject:data ()object method.
OdbObject:free ()Destroy this object (will be called by Garbage Collector).
OdbObject:id ()object method.
OdbObject:size ()object method.
OdbObject:type ()object method.
+ + + + + + +
+
+ + + +

Functions

+
+ + + +
OdbObject:data ()
+
+object method.

Calls git_odb_object_data:

This is the uncompressed, raw data as read from the ODB, without the leading header.

This pointer is owned by the object and shall not be free'd.

Calls git_odb_object_size:

This is the real size of the `data` buffer, not the actual size of the object. + + + + + + + +

Return value:

+string. + + + +
+ + + + +
OdbObject:free ()
+
+Destroy this object (will be called by Garbage Collector).

Calls git_odb_object_free:

This method must always be called once a `git_odb_object` is no longer needed, otherwise memory will leak. + + + + + + + + + +

+ + + + +
OdbObject:id ()
+
+object method.

Calls git_odb_object_id:

This is the OID from which the object was read from + + + + + + + +

Return value:

+OID. + + + +
+ + + + +
OdbObject:size ()
+
+object method.

Calls git_odb_object_size:

This is the real size of the `data` buffer, not the actual size of the object. + + + + + + + +

Return value:

+integer. + + + +
+ + + + +
OdbObject:type ()
+
+object method.

Calls git_odb_object_type:

+ + + + + + + +

Return value:

+string. + + + +
+ + +
+ + + + + + +
+ +
+ +
+

Valid XHTML 1.0!

+
+ +
+ + diff --git a/docs/modules/Reference.html b/docs/modules/Reference.html new file mode 100644 index 0000000..9e9bfc7 --- /dev/null +++ b/docs/modules/Reference.html @@ -0,0 +1,616 @@ + + + + Reference + + + + + +
+ +
+ +
+
+
+ +
+ + + +
+ +

Module Reference

+ +

Class "Reference".

+ + + + + +

Functions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Reference.list (repo, list_flags)module function.
Reference.lookup (repo, name)Create a new Reference object.
Reference.packall (repo)module function.
Reference:delete ()object method.
Reference:name ()object method.
Reference:oid ()object method.
Reference:owner ()object method.
Reference:rename (new_name, force)object method.
Reference:resolve ()object method.
Reference:set_oid (oid)object method.
Reference:set_target (target)object method.
Reference:target ()object method.
Reference:type ()object method.
+ + + + + + +
+
+ + + +

Functions

+
+ + + +
Reference.list (repo, list_flags)
+
+module function. + + +

Parameters

+
    + +
  • + repo: Must be of type Repository. +
  • + +
  • + list_flags: Must be of type integer. +
  • + +
+ + + + + + +

Return values:

+
    + +
  1. StrArray or nil on error. + +
  2. Error string. + +
+ + + +
+ + + + +
Reference.lookup (repo, name)
+
+Create a new Reference object.

Calls git_reference_lookup:

The generated reference must be freed by the user. + + +

Parameters

+
    + +
  • + repo: the repository to look up the reference. Must be of type Repository. +
  • + +
  • + name: the long name for the reference (e.g. HEAD, ref/heads/master, refs/tags/v0.1.0, ...). Must be of type string. +
  • + +
+ + + + + + +

Return values:

+
    + +
  1. Reference or nil on error. + +
  2. Error string. + +
+ + + +
+ + + + +
Reference.packall (repo)
+
+module function.

Calls git_reference_packall:

This method will load into the cache all the loose references on the repository and update the `packed-refs` file with them.

Once the `packed-refs` file has been written properly, the loose references will be removed from disk. + + +

Parameters

+
    + +
  • + repo: Repository where the loose refs will be packed. Must be of type Repository. +
  • + +
+ + + + + + +

Return values:

+
    + +
  1. true if no error. + +
  2. Error string. + +
+ + + +
+ + + + +
Reference:delete ()
+
+object method.

Calls git_reference_delete:

This method works for both direct and symbolic references.

The reference will be immediately removed on disk and from memory. The given reference pointer will no longer be valid. + + + + + + + +

Return values:

+
    + +
  1. true if no error. + +
  2. Error string. + +
+ + + +
+ + + + +
Reference:name ()
+
+object method.

Calls git_reference_name:

+ + + + + + + +

Return value:

+string. + + + +
+ + + + +
Reference:oid ()
+
+object method.

Calls git_reference_oid:

Only available if the reference is direct (i.e. not symbolic) + + + + + + + +

Return value:

+OID. + + + +
+ + + + +
Reference:owner ()
+
+object method.

Calls git_reference_owner:

+ + + + + + + +

Return value:

+Repository. + + + +
+ + + + +
Reference:rename (new_name, force)
+
+object method.

Calls git_reference_rename:

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.

The given git_reference will be updated in place.

The reference will be immediately renamed in-memory and on disk.

If the `force` flag is not enabled, and there's already a reference with the given name, the renaming will fail.

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. + + +

Parameters

+
    + +
  • + new_name: The new name for the reference. Must be of type string. +
  • + +
  • + force: Overwrite an existing reference. Must be of type boolean. +
  • + +
+ + + + + + +

Return values:

+
    + +
  1. true if no error. + +
  2. Error string. + +
+ + + +
+ + + + +
Reference:resolve ()
+
+object method.

Calls git_reference_resolve:

Thie method iteratively peels a symbolic reference until it resolves to a direct reference to an OID.

The peeled reference is returned in the `resolved_ref` argument, and must be freed manually once it's no longer needed.

If a direct reference is passed as an argument, a copy of that reference is returned. This copy must be manually freed too. + + + + + + + +

Return values:

+
    + +
  1. Reference or nil on error. + +
  2. Error string. + +
+ + + +
+ + + + +
Reference:set_oid (oid)
+
+object method.

Calls git_reference_set_oid:

The reference must be a direct reference, otherwise this method will fail.

The reference will be automatically updated in memory and on disk. + + +

Parameters

+
    + +
  • + oid: Must be of type OID. +
  • + +
+ + + + + + +

Return values:

+
    + +
  1. true if no error. + +
  2. Error string. + +
+ + + +
+ + + + +
Reference:set_target (target)
+
+object method.

Calls git_reference_set_target:

The reference must be a symbolic reference, otherwise this method will fail.

The reference will be automatically updated in memory and on disk. + + +

Parameters

+
    + +
  • + target: The new target for the reference. Must be of type string. +
  • + +
+ + + + + + +

Return values:

+
    + +
  1. true if no error. + +
  2. Error string. + +
+ + + +
+ + + + +
Reference:target ()
+
+object method.

Calls git_reference_target:

Only available if the reference is symbolic + + + + + + + +

Return value:

+string. + + + +
+ + + + +
Reference:type ()
+
+object method.

Calls git_reference_type:

Either direct (GIT_REF_OID) or symbolic (GIT_REF_SYMBOLIC) + + + + + + + +

Return value:

+integer. + + + +
+ + +
+ + + + + + +
+ +
+ +
+

Valid XHTML 1.0!

+
+ +
+ + diff --git a/docs/modules/Repository.html b/docs/modules/Repository.html new file mode 100644 index 0000000..eb4d77f --- /dev/null +++ b/docs/modules/Repository.html @@ -0,0 +1,668 @@ + + + + Reference + + + + + +
+ +
+ +
+
+
+ +
+ + + +
+ +

Module Repository

+ +

Class "Repository".

+ + + + + +

Functions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Repository.init (path, is_bare)Create a new Repository object.
Repository.open (path)Create a new Repository object.
Repository:config ()object method.
Repository:head ()object method.
Repository:head_detached ()object method.
Repository:head_orphan ()object method.
Repository:index ()object method.
Repository:is_bare ()object method.
Repository:is_empty ()object method.
Repository:odb ()object method.
Repository:path ()object method.
Repository:set_config (config)object method.
Repository:set_index (index)object method.
Repository:set_odb (odb)object method.
Repository:set_workdir (workdir)object method.
Repository:workdir ()object method.
+ + + + + + +
+
+ + + +

Functions

+
+ + + +
Repository.init (path, is_bare)
+
+Create a new Repository object.

Calls git_repository_init:

TODO: - Reinit the repository + + +

Parameters

+
    + +
  • + path: the path to the repository. Must be of type string. +
  • + +
  • + is_bare: if true, a Git repository without a working directory is created at the pointed path. If false, provided path will be considered as the working directory into which the .git directory will be created.. Must be of type integer. +
  • + +
+ + + + + + +

Return values:

+
    + +
  1. Repository or nil on error. + +
  2. Error string. + +
+ + + +
+ + + + +
Repository.open (path)
+
+Create a new Repository object.

Calls git_repository_open:

The 'path' argument must point to either a git repository folder, or an existing work dir.

The method will automatically detect if 'path' is a normal or bare repository or fail is 'path' is neither. + + +

Parameters

+
    + +
  • + path: the path to the repository. Must be of type string. +
  • + +
+ + + + + + +

Return values:

+
    + +
  1. Repository or nil on error. + +
  2. Error string. + +
+ + + +
+ + + + +
Repository:config ()
+
+object method.

Calls git_repository_config:

If a configuration file has not been set, the default config set for the repository will be returned, including global and system configurations (if they are available).

The configuration file must be freed once it's no longer being used by the user. + + + + + + + +

Return values:

+
    + +
  1. Config or nil on error. + +
  2. Error string. + +
+ + + +
+ + + + +
Repository:head ()
+
+object method.

Calls git_repository_head:

+ + + + + + + +

Return values:

+
    + +
  1. Reference or nil on error. + +
  2. Error string. + +
+ + + +
+ + + + +
Repository:head_detached ()
+
+object method.

Calls git_repository_head_detached:

A repository's HEAD is detached when it points directly to a commit instead of a branch. + + + + + + + +

Return value:

+boolean. + + + +
+ + + + +
Repository:head_orphan ()
+
+object method.

Calls git_repository_head_orphan:

An orphan branch is one named from HEAD but which doesn't exist in the refs namespace, because it doesn't have any commit to point to. + + + + + + + +

Return value:

+boolean. + + + +
+ + + + +
Repository:index ()
+
+object method.

Calls git_repository_index:

If a custom index has not been set, the default index for the repository will be returned (the one located in `.git/index`).

The index must be freed once it's no longer being used by the user. + + + + + + + +

Return values:

+
    + +
  1. Index or nil on error. + +
  2. Error string. + +
+ + + +
+ + + + +
Repository:is_bare ()
+
+object method.

Calls git_repository_is_bare:

+ + + + + + + +

Return value:

+boolean. + + + +
+ + + + +
Repository:is_empty ()
+
+object method.

Calls git_repository_is_empty:

An empty repository has just been initialized and contains no commits. + + + + + + + +

Return value:

+boolean. + + + +
+ + + + +
Repository:odb ()
+
+object method.

Calls git_repository_odb:

If a custom ODB has not been set, the default database for the repository will be returned (the one located in `.git/objects`).

The ODB must be freed once it's no longer being used by the user. + + + + + + + +

Return values:

+
    + +
  1. ODB or nil on error. + +
  2. Error string. + +
+ + + +
+ + + + +
Repository:path ()
+
+object method.

Calls git_repository_path:

This is the path of the `.git` folder for normal repositories, or of the repository itself for bare repositories. + + + + + + + +

Return value:

+string. + + + +
+ + + + +
Repository:set_config (config)
+
+object method.

Calls git_repository_set_config:

This configuration file will be used for all configuration queries involving this repository.

The repository will keep a reference to the config file; the user must still free the config after setting it to the repository, or it will leak. + + +

Parameters

+
    + +
  • + config: A Config object. Must be of type Config. +
  • + +
+ + + + + + + + +
+ + + + +
Repository:set_index (index)
+
+object method.

Calls git_repository_set_index:

This index will be used for all index-related operations involving this repository.

The repository will keep a reference to the index file; the user must still free the index after setting it to the repository, or it will leak. + + +

Parameters

+
    + +
  • + index: An index object. Must be of type Index. +
  • + +
+ + + + + + + + +
+ + + + +
Repository:set_odb (odb)
+
+object method.

Calls git_repository_set_odb:

The ODB will be used for all object-related operations involving this repository.

The repository will keep a reference to the ODB; the user must still free the ODB object after setting it to the repository, or it will leak. + + +

Parameters

+
    + +
  • + odb: An ODB object. Must be of type ODB. +
  • + +
+ + + + + + + + +
+ + + + +
Repository:set_workdir (workdir)
+
+object method.

Calls git_repository_set_workdir:

The working directory doesn't need to be the same one that contains the `.git` folder for this repository.

If this repository is bare, setting its working directory will turn it into a normal repository, capable of performing all the common workdir operations (checkout, status, index manipulation, etc). + + +

Parameters

+
    + +
  • + workdir: The path to a working directory. Must be of type string. +
  • + +
+ + + + + + +

Return values:

+
    + +
  1. true if no error. + +
  2. Error string. + +
+ + + +
+ + + + +
Repository:workdir ()
+
+object method.

Calls git_repository_workdir:

If the repository is bare, this function will always return NULL. + + + + + + + +

Return value:

+string. + + + +
+ + +
+ + + + + + +
+ +
+ +
+

Valid XHTML 1.0!

+
+ +
+ + diff --git a/docs/modules/RevWalk.html b/docs/modules/RevWalk.html new file mode 100644 index 0000000..6e99863 --- /dev/null +++ b/docs/modules/RevWalk.html @@ -0,0 +1,428 @@ + + + + Reference + + + + + +
+ +
+ +
+
+
+ +
+ + + +
+ +

Module RevWalk

+ +

Class "RevWalk".

+ + + + + +

Functions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
RevWalk.new (repo)Create a new RevWalk object.
RevWalk:close ()Destroy this object (will be called by Garbage Collector).
RevWalk:hide (id)object method.
RevWalk:next ()object method.
RevWalk:push (id)object method.
RevWalk:repository ()object method.
RevWalk:reset ()object method.
RevWalk:sorting (sort_mode)object method.
+ + + + + + +
+
+ + + +

Functions

+
+ + + +
RevWalk.new (repo)
+
+Create a new RevWalk object.

Calls git_revwalk_new:

This revision walker uses a custom memory pool and an internal commit cache, so it is relatively expensive to allocate.

For maximum performance, this revision walker should be reused for different walks.

This revision walker is *not* thread safe: it may only be used to walk a repository on a single thread; however, it is possible to have several revision walkers in several different threads walking the same repository. + + +

Parameters

+
    + +
  • + repo: the repo to walk through. Must be of type Repository. +
  • + +
+ + + + + + +

Return values:

+
    + +
  1. RevWalk or nil on error. + +
  2. Error string. + +
+ + + +
+ + + + +
RevWalk:close ()
+
+Destroy this object (will be called by Garbage Collector).

Calls git_revwalk_free:

+ + + + + + + + + +

+ + + + +
RevWalk:hide (id)
+
+object method.

Calls git_revwalk_hide:

The given OID must belong to a commit on the walked repository.

The resolved commit and all its parents will be hidden from the output on the revision walk. + + +

Parameters

+
    + +
  • + id: Must be of type OID. +
  • + +
+ + + + + + +

Return values:

+
    + +
  1. true if no error. + +
  2. Error string. + +
+ + + +
+ + + + +
RevWalk:next ()
+
+object method.

Calls git_revwalk_next:

The initial call to this method is *not* blocking when iterating through a repo with a time-sorting mode.

Iterating with Topological or inverted modes makes the initial call blocking to preprocess the commit list, but this block should be mostly unnoticeable on most repositories (topological preprocessing times at 0.3s on the git.git repo).

The revision walker is reset when the walk is over. + + + + + + + +

Return values:

+
    + +
  1. OID or nil on error. + +
  2. Error string. + +
+ + + +
+ + + + +
RevWalk:push (id)
+
+object method.

Calls git_revwalk_push:

The given OID must belong to a commit on the walked repository.

The given commit will be used as one of the roots when starting the revision walk. At least one commit must be pushed the repository before a walk can be started. + + +

Parameters

+
    + +
  • + id: Must be of type OID. +
  • + +
+ + + + + + +

Return values:

+
    + +
  1. true if no error. + +
  2. Error string. + +
+ + + +
+ + + + +
RevWalk:repository ()
+
+object method.

Calls git_revwalk_repository:

+ + + + + + + +

Return value:

+Repository. + + + +
+ + + + +
RevWalk:reset ()
+
+object method.

Calls git_revwalk_reset:

This will clear all the pushed and hidden commits, and leave the walker in a blank state (just like at creation) ready to receive new commit pushes and start a new walk.

The revision walk is automatically reset when a walk is over. + + + + + + + + + +

+ + + + +
RevWalk:sorting (sort_mode)
+
+object method.

Calls git_revwalk_sorting:

Changing the sorting mode resets the walker. + + +

Parameters

+
    + +
  • + sort_mode: combination of GIT_SORT_XXX flags. Must be of type integer. +
  • + +
+ + + + + + + + +
+ + +
+ + + + + + +
+ +
+ +
+

Valid XHTML 1.0!

+
+ +
+ + diff --git a/docs/modules/Signature.html b/docs/modules/Signature.html new file mode 100644 index 0000000..66eca21 --- /dev/null +++ b/docs/modules/Signature.html @@ -0,0 +1,354 @@ + + + + Reference + + + + + +
+ +
+ +
+
+
+ +
+ + + +
+ +

Module Signature

+ +

Class "Signature".

+ + + + + +

Functions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Signature.new (name, email, time, offset)Create a new Signature object.
Signature.now (name, email)Create a new Signature object.
Signature:email ()object method.
Signature:name ()object method.
Signature:when ()object method.
+ + + + + + +
+
+ + + +

Functions

+
+ + + +
Signature.new (name, email, time, offset)
+
+Create a new Signature object.

Calls git_signature_new:

+ + +

Parameters

+
    + +
  • + name: name of the person. Must be of type string. +
  • + +
  • + email: email of the person. Must be of type string. +
  • + +
  • + time: time when the action happened. Must be of type integer. +
  • + +
  • + offset: timezone offset in minutes for the time. Must be of type integer. +
  • + +
+ + + + + + +

Return values:

+
    + +
  1. Signature or nil on error. + +
  2. Error string. + +
+ + + +
+ + + + +
Signature.now (name, email)
+
+Create a new Signature object.

Calls git_signature_now:

+ + +

Parameters

+
    + +
  • + name: name of the person. Must be of type string. +
  • + +
  • + email: email of the person. Must be of type string. +
  • + +
+ + + + + + +

Return values:

+
    + +
  1. Signature or nil on error. + +
  2. Error string. + +
+ + + +
+ + + + +
Signature:email ()
+
+object method. + + + + + + + +

Return value:

+string. + + + +
+ + + + +
Signature:name ()
+
+object method. + + + + + + + +

Return value:

+string. + + + +
+ + + + +
Signature:when ()
+
+object method. + + + + + + + +

Return values:

+
    + +
  1. integer. + +
  2. integer. + +
+ + + +
+ + +
+ + + + + + +
+ +
+ +
+

Valid XHTML 1.0!

+
+ +
+ + diff --git a/docs/modules/StrArray.html b/docs/modules/StrArray.html new file mode 100644 index 0000000..1fad380 --- /dev/null +++ b/docs/modules/StrArray.html @@ -0,0 +1,308 @@ + + + + Reference + + + + + +
+ +
+ +
+
+
+ +
+ + + +
+ +

Module StrArray

+ +

Class "StrArray".

+ + + + + +

Functions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
StrArray.new ()Create a new StrArray object.
StrArray:count ()object method.
StrArray:free ()Destroy this object (will be called by Garbage Collector).
StrArray:get_array ()object method.
StrArray:str (n)object method.
+ + + + + + +
+
+ + + +

Functions

+
+ + + +
StrArray.new ()
+
+Create a new StrArray object. + + + + + + + +

Return value:

+StrArray. + + + +
+ + + + +
StrArray:count ()
+
+object method. + + + + + + + +

Return value:

+integer. + + + +
+ + + + +
StrArray:free ()
+
+Destroy this object (will be called by Garbage Collector). + + + + + + + + + +
+ + + + +
StrArray:get_array ()
+
+object method. + + + + + + + +

Return value:

+nil. + + + +
+ + + + +
StrArray:str (n)
+
+object method. + + +

Parameters

+
    + +
  • + n: Must be of type integer. +
  • + +
+ + + + + + +

Return value:

+string. + + + +
+ + +
+ + + + + + +
+ +
+ +
+

Valid XHTML 1.0!

+
+ +
+ + diff --git a/docs/modules/Tag.html b/docs/modules/Tag.html new file mode 100644 index 0000000..7bc7d6a --- /dev/null +++ b/docs/modules/Tag.html @@ -0,0 +1,424 @@ + + + + Reference + + + + + +
+ +
+ +
+
+
+ +
+ + + +
+ +

Module Tag

+ +

Class "Tag". Extends Object

+ + + + + +

Functions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Object:free ()Destroy this object (will be called by Garbage Collector).
Object:id ()object method.
Object:owner ()object method.
Object:type ()object method.
Tag.lookup (repo, id)Create a new Tag object.
Tag:message ()object method.
Tag:name ()object method.
Tag:tagger ()object method.
Tag:target ()object method.
+ + + + + + +
+
+ + + +

Functions

+
+ + + +
Object:free ()
+
+Destroy this object (will be called by Garbage Collector).

Calls git_object_free:

This method instructs the library to close an existing object; note that git_objects are owned and cached by the repository so the object may or may not be freed after this library call, depending on how agressive is the caching mechanism used by the repository.

IMPORTANT: It *is* necessary to call this method when you stop using an object. Failure to do so will cause a memory leak. + + + + + + + + + +

+ + + + +
Object:id ()
+
+object method.

Calls git_object_id:

+ + + + + + + +

Return value:

+OID. + + + +
+ + + + +
Object:owner ()
+
+object method.

Calls git_object_owner:

Freeing or calling `git_repository_close` on the returned pointer will invalidate the actual object.

Any other operation may be run on the repository without affecting the object. + + + + + + + +

Return value:

+Repository. + + + +
+ + + + +
Object:type ()
+
+object method.

Calls git_object_type:

+ + + + + + + +

Return value:

+string. + + + +
+ + + + +
Tag.lookup (repo, id)
+
+Create a new Tag object.

Calls git_tag_lookup:

+ + +

Parameters

+
    + +
  • + repo: the repo to use when locating the tag.. Must be of type Repository. +
  • + +
  • + id: identity of the tag to locate.. Must be of type OID. +
  • + +
+ + + + + + +

Return values:

+
    + +
  1. Tag or nil on error. + +
  2. Error string. + +
+ + + +
+ + + + +
Tag:message ()
+
+object method.

Calls git_tag_message:

+ + + + + + + +

Return value:

+string. + + + +
+ + + + +
Tag:name ()
+
+object method.

Calls git_tag_name:

+ + + + + + + +

Return value:

+string. + + + +
+ + + + +
Tag:tagger ()
+
+object method.

Calls git_tag_tagger:

+ + + + + + + +

Return value:

+Signature. + + + +
+ + + + +
Tag:target ()
+
+object method.

Calls git_tag_target:

This method performs a repository lookup for the given object and returns it + + + + + + + +

Return values:

+
    + +
  1. Object or nil on error. + +
  2. Error string. + +
+ + + +
+ + +
+ + + + + + +
+ +
+ +
+

Valid XHTML 1.0!

+
+ +
+ + diff --git a/docs/modules/Tree.html b/docs/modules/Tree.html new file mode 100644 index 0000000..d7b8481 --- /dev/null +++ b/docs/modules/Tree.html @@ -0,0 +1,411 @@ + + + + Reference + + + + + +
+ +
+ +
+
+
+ +
+ + + +
+ +

Module Tree

+ +

Class "Tree". Extends Object

+ + + + + +

Functions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Object:free ()Destroy this object (will be called by Garbage Collector).
Object:id ()object method.
Object:owner ()object method.
Object:type ()object method.
Tree.lookup (repo, id)Create a new Tree object.
Tree:entry_byindex (index)object method.
Tree:entry_byname (filename)object method.
Tree:entrycount ()object method.
+ + + + + + +
+
+ + + +

Functions

+
+ + + +
Object:free ()
+
+Destroy this object (will be called by Garbage Collector).

Calls git_object_free:

This method instructs the library to close an existing object; note that git_objects are owned and cached by the repository so the object may or may not be freed after this library call, depending on how agressive is the caching mechanism used by the repository.

IMPORTANT: It *is* necessary to call this method when you stop using an object. Failure to do so will cause a memory leak. + + + + + + + + + +

+ + + + +
Object:id ()
+
+object method.

Calls git_object_id:

+ + + + + + + +

Return value:

+OID. + + + +
+ + + + +
Object:owner ()
+
+object method.

Calls git_object_owner:

Freeing or calling `git_repository_close` on the returned pointer will invalidate the actual object.

Any other operation may be run on the repository without affecting the object. + + + + + + + +

Return value:

+Repository. + + + +
+ + + + +
Object:type ()
+
+object method.

Calls git_object_type:

+ + + + + + + +

Return value:

+string. + + + +
+ + + + +
Tree.lookup (repo, id)
+
+Create a new Tree object.

Calls git_tree_lookup:

+ + +

Parameters

+
    + +
  • + repo: the repo to use when locating the tree.. Must be of type Repository. +
  • + +
  • + id: identity of the tree to locate.. Must be of type OID. +
  • + +
+ + + + + + +

Return values:

+
    + +
  1. Tree or nil on error. + +
  2. Error string. + +
+ + + +
+ + + + +
Tree:entry_byindex (index)
+
+object method.

Calls git_tree_entry_byindex:

+ + +

Parameters

+
    + +
  • + index: Must be of type integer. +
  • + +
+ + + + + + +

Return value:

+TreeEntry. + + + +
+ + + + +
Tree:entry_byname (filename)
+
+object method.

Calls git_tree_entry_byname:

+ + +

Parameters

+
    + +
  • + filename: the filename of the desired entry. Must be of type string. +
  • + +
+ + + + + + +

Return value:

+TreeEntry. + + + +
+ + + + +
Tree:entrycount ()
+
+object method.

Calls git_tree_entrycount:

+ + + + + + + +

Return value:

+integer. + + + +
+ + +
+ + + + + + +
+ +
+ +
+

Valid XHTML 1.0!

+
+ +
+ + diff --git a/docs/modules/TreeEntry.html b/docs/modules/TreeEntry.html new file mode 100644 index 0000000..2033128 --- /dev/null +++ b/docs/modules/TreeEntry.html @@ -0,0 +1,296 @@ + + + + Reference + + + + + +
+ +
+ +
+
+
+ +
+ + + +
+ +

Module TreeEntry

+ +

Class "TreeEntry".

+ + + + + +

Functions

+ + + + + + + + + + + + + + + + + + + + + + +
TreeEntry:attributes ()object method.
TreeEntry:id ()object method.
TreeEntry:name ()object method.
TreeEntry:object (repo, object)object method.
+ + + + + + +
+
+ + + +

Functions

+
+ + + +
TreeEntry:attributes ()
+
+object method.

Calls git_tree_entry_attributes:

+ + + + + + + +

Return value:

+integer. + + + +
+ + + + +
TreeEntry:id ()
+
+object method. + + + + + + + +

Return value:

+OID. + + + +
+ + + + +
TreeEntry:name ()
+
+object method.

Calls git_tree_entry_name:

+ + + + + + + +

Return value:

+string. + + + +
+ + + + +
TreeEntry:object (repo, object)
+
+object method. + + +

Parameters

+
    + +
  • + repo: repository where to lookup the pointed object. Must be of type Repository. +
  • + +
  • + object: pointer to the converted object +
  • + +
+ + + + + + +

Return values:

+
    + +
  1. Object or nil on error. + +
  2. Error string. + +
+ + + +
+ + +
+ + + + + + +
+ +
+ +
+

Valid XHTML 1.0!

+
+ +
+ + diff --git a/docs/modules/git2.html b/docs/modules/git2.html new file mode 100644 index 0000000..9a44134 --- /dev/null +++ b/docs/modules/git2.html @@ -0,0 +1,202 @@ + + + + Reference + + + + + +
+ +
+ +
+
+
+ +
+ + + +
+ +

Module git2

+ +

Module git2. See libgit2 API docs.
Class StrArray
Class Repository
Class Config
Class OdbObject
Class OID
Class OID_Shorten
Class ODB
Class ODBBackend
Class Index
Class IndexEntry
Class IndexEntryUnmerged
Class Object
Class Blob
Class Signature
Class Commit
Class Tree
Class TreeEntry
Class Tag
Class RevWalk
Class Reference

+ + + + + +

Functions

+ + + + + + + +
git2.version ()module function.
+ + + + + + +
+
+ + + +

Functions

+
+ + + +
git2.version ()
+
+module function. + + + + + + + +

Return value:

+nil. + + + +
+ + +
+ + + + + + +
+ +
+ +
+

Valid XHTML 1.0!

+
+ +
+ + -- cgit v1.2.1