summaryrefslogtreecommitdiff
path: root/docs/git2/Index.luadoc
diff options
context:
space:
mode:
Diffstat (limited to 'docs/git2/Index.luadoc')
-rw-r--r--docs/git2/Index.luadoc174
1 files changed, 174 insertions, 0 deletions
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.
+--
+-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/index/git_index_open">git_index_open</a>:<p><p>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.<p> If you need to access the index of an actual repository,
+-- use the `git_repository_index` wrapper.<p> 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 <code>string</code>.
+-- @return <a href="Index.html">Index</a> or <code>nil</code> on error.
+-- @return Error string.
+-- @name Index.bare
+function Index.bare(index_path)
+end
+
+--- object method.
+--
+-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/index/git_index_clear">git_index_clear</a>:<p><p>
+-- @name Index:clear
+function Index:clear()
+end
+
+--- object method.
+--
+-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/index/git_index_read">git_index_read</a>:<p><p>
+-- @return <code>true</code> if no error.
+-- @return Error string.
+-- @name Index:read
+function Index:read()
+end
+
+--- object method.
+--
+-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/index/git_index_write">git_index_write</a>:<p><p>
+-- @return <code>true</code> if no error.
+-- @return Error string.
+-- @name Index:write
+function Index:write()
+end
+
+--- object method.
+--
+-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/index/git_index_find">git_index_find</a>:<p><p>
+-- @param path path to search. Must be of type <code>string</code>.
+-- @return <code>integer</code>.
+-- @name Index:find
+function Index:find(path)
+end
+
+--- object method.
+--
+-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/index/git_index_uniq">git_index_uniq</a>:<p><p>
+-- @name Index:uniq
+function Index:uniq()
+end
+
+--- object method.
+--
+-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/index/git_index_add">git_index_add</a>:<p><p>The file `path` must be relative to the repository's
+-- working folder and must be readable.<p> This method will fail in bare index instances.<p> 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 <code>string</code>.
+-- @param stage stage for the entry. Must be of type <code>integer</code>.
+-- @return <code>true</code> if no error.
+-- @return Error string.
+-- @name Index:add
+function Index:add(path, stage)
+end
+
+--- object method.
+--
+-- @param source_entry Must be of type <a href="IndexEntry.html">IndexEntry</a>.
+-- @return <code>true</code> if no error.
+-- @return Error string.
+-- @name Index:add2
+function Index:add2(source_entry)
+end
+
+--- object method.
+--
+-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/index/git_index_append">git_index_append</a>:<p><p>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.<p> The file `path` must be relative to the repository's
+-- working folder and must be readable.<p> This method will fail in bare index instances.
+-- @param path filename to add. Must be of type <code>string</code>.
+-- @param stage stage for the entry. Must be of type <code>integer</code>.
+-- @return <code>true</code> if no error.
+-- @return Error string.
+-- @name Index:append
+function Index:append(path, stage)
+end
+
+--- object method.
+--
+-- @param source_entry Must be of type <a href="IndexEntry.html">IndexEntry</a>.
+-- @return <code>true</code> if no error.
+-- @return Error string.
+-- @name Index:append2
+function Index:append2(source_entry)
+end
+
+--- object method.
+--
+-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/index/git_index_remove">git_index_remove</a>:<p><p>
+-- @param position position of the entry to remove. Must be of type <code>integer</code>.
+-- @return <code>true</code> if no error.
+-- @return Error string.
+-- @name Index:remove
+function Index:remove(position)
+end
+
+--- object method.
+--
+-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/index/git_index_get">git_index_get</a>:<p><p>This entry can be modified, and the changes will be written
+-- back to disk on the next write() call.<p> The entry should not be freed by the caller.
+-- @param n the position of the entry. Must be of type <code>integer</code>.
+-- @return <a href="IndexEntry.html">IndexEntry</a>.
+-- @name Index:get
+function Index:get(n)
+end
+
+--- object method.
+--
+-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/index/git_index_entrycount">git_index_entrycount</a>:<p><p>
+-- @return <code>integer</code>.
+-- @name Index:entrycount
+function Index:entrycount()
+end
+
+--- object method.
+--
+-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/index/git_index_entrycount_unmerged">git_index_entrycount_unmerged</a>:<p><p>
+-- @return <code>integer</code>.
+-- @name Index:entrycount_unmerged
+function Index:entrycount_unmerged()
+end
+
+--- object method.
+--
+-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/index/git_index_get_unmerged_bypath">git_index_get_unmerged_bypath</a>:<p><p>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 <code>string</code>.
+-- @return <a href="IndexEntryUnmerged.html">IndexEntryUnmerged</a>.
+-- @name Index:get_unmerged_bypath
+function Index:get_unmerged_bypath(path)
+end
+
+--- object method.
+--
+-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/index/git_index_get_unmerged_byindex">git_index_get_unmerged_byindex</a>:<p><p>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 <code>integer</code>.
+-- @return <a href="IndexEntryUnmerged.html">IndexEntryUnmerged</a>.
+-- @name Index:get_unmerged_byindex
+function Index:get_unmerged_byindex(n)
+end
+
+--- object method.
+--
+-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/index/git_index_read_tree">git_index_read_tree</a>:<p><p>The current index contents will be replaced by the specified tree.
+-- @param tree tree to read. Must be of type <a href="Tree.html">Tree</a>.
+-- @return <code>true</code> if no error.
+-- @return Error string.
+-- @name Index:read_tree
+function Index:read_tree(tree)
+end
+