summaryrefslogtreecommitdiff
path: root/docs/git2/Tree.luadoc
blob: 7f0831b2cf5fd6121f3b68478d82cdadfbfea93a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
--
-- Warning: AUTOGENERATED DOCS.
--

--- Class "Tree".
--
-- Extends <a href="Object.html">Object</a><br />
module("Tree")

--- Create a new Tree object.
--
-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/tree/git_tree_lookup">git_tree_lookup</a>:<p><p>
-- @param repo the repo to use when locating the tree..  Must be of type <a href="Repository.html">Repository</a>.
-- @param id identity of the tree to locate..  Must be of type <a href="OID.html">OID</a>.
-- @return <a href="Tree.html">Tree</a> or <code>nil</code> on error.
-- @return Error string.
-- @name Tree.lookup
function Tree.lookup(repo, id)
end

--- object method.
--
-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/tree/git_tree_entrycount">git_tree_entrycount</a>:<p><p>
-- @return <code>integer</code>.
-- @name Tree:entrycount
function Tree:entrycount()
end

--- object method.
--
-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/tree/git_tree_entry_byname">git_tree_entry_byname</a>:<p><p>
-- @param filename the filename of the desired entry.  Must be of type <code>string</code>.
-- @return <a href="TreeEntry.html">TreeEntry</a>.
-- @name Tree:entry_byname
function Tree:entry_byname(filename)
end

--- object method.
--
-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/tree/git_tree_entry_byindex">git_tree_entry_byindex</a>:<p><p>
-- @param index Must be of type <code>integer</code>.
-- @return <a href="TreeEntry.html">TreeEntry</a>.
-- @name Tree:entry_byindex
function Tree:entry_byindex(index)
end

--- Destroy this object (will be called by Garbage Collector).
--
-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/object/git_object_free">git_object_free</a>:<p><p>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.<p> 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.
--
-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/object/git_object_id">git_object_id</a>:<p><p>
-- @return <a href="OID.html">OID</a>.
-- @name Object:id
function Object:id()
end

--- object method.
--
-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/object/git_object_type">git_object_type</a>:<p><p>
-- @return <code>string</code>.
-- @name Object:type
function Object:type()
end

--- object method.
--
-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/object/git_object_owner">git_object_owner</a>:<p><p>Freeing or calling `git_repository_close` on the
--  returned pointer will invalidate the actual object.<p> Any other operation may be run on the repository without
--  affecting the object.
-- @return <a href="Repository.html">Repository</a>.
-- @name Object:owner
function Object:owner()
end