summaryrefslogtreecommitdiff
path: root/docs/git2/Commit.luadoc
blob: 436fb4a2ee4426ed94eefb8199423285aa36f635 (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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
--
-- Warning: AUTOGENERATED DOCS.
--

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

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

--- module function.
--
-- @param oid Must be of type <a href="OID.html">OID</a>.
-- @param repo Must be of type <a href="Repository.html">Repository</a>.
-- @param update_ref Must be of type <code>string</code>.
-- @param author Must be of type <a href="Signature.html">Signature</a>.
-- @param committer Must be of type <a href="Signature.html">Signature</a>.
-- @param message_encoding Must be of type <code>string</code>.
-- @param message Must be of type <code>string</code>.
-- @param tree Must be of type <a href="Tree.html">Tree</a>.
-- @param parent Must be of type <a href="Commit.html">Commit</a>.
-- @return <code>true</code> 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.
--
-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/commit/git_commit_id">git_commit_id</a>:<p><p>
-- @return <a href="OID.html">OID</a>.
-- @name Commit:id
function Commit:id()
end

--- object method.
--
-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/commit/git_commit_message_encoding">git_commit_message_encoding</a>:<p><p>The encoding may be NULL if the `encoding` header
--  in the commit is missing; in that case UTF-8 is assumed.
-- @return <code>string</code>.
-- @name Commit:message_encoding
function Commit:message_encoding()
end

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

--- object method.
--
-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/commit/git_commit_time">git_commit_time</a>:<p><p>
-- @return <code>integer</code>.
-- @name Commit:time
function Commit:time()
end

--- object method.
--
-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/commit/git_commit_time_offset">git_commit_time_offset</a>:<p><p>
-- @return <code>integer</code>.
-- @name Commit:time_offset
function Commit:time_offset()
end

--- object method.
--
-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/commit/git_commit_committer">git_commit_committer</a>:<p><p>
-- @return <a href="Signature.html">Signature</a>.
-- @name Commit:committer
function Commit:committer()
end

--- object method.
--
-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/commit/git_commit_author">git_commit_author</a>:<p><p>
-- @return <a href="Signature.html">Signature</a>.
-- @name Commit:author
function Commit:author()
end

--- object method.
--
-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/commit/git_commit_tree">git_commit_tree</a>:<p><p>
-- @return <a href="Tree.html">Tree</a> or <code>nil</code> on error.
-- @return Error string.
-- @name Commit:tree
function Commit:tree()
end

--- object method.
--
-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/commit/git_commit_parentcount">git_commit_parentcount</a>:<p><p>
-- @return <code>integer</code>.
-- @name Commit:parentcount
function Commit:parentcount()
end

--- object method.
--
-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/commit/git_commit_parent">git_commit_parent</a>:<p><p>
-- @param n the position of the parent (from 0 to `parentcount`).  Must be of type <code>integer</code>.
-- @return <a href="Commit.html">Commit</a> or <code>nil</code> on error.
-- @return Error string.
-- @name Commit:parent
function Commit:parent(n)
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