Skip to content

Commit 6aa325f

Browse files
committed
Copied details from libgit2 API docs.
1 parent 7f659ed commit 6aa325f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+1051
-753
lines changed

git2.luadoc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
--- Module git2.
66
--
7+
-- See <a href="http://libgit2.github.com/libgit2/#HEAD">libgit2 API docs</a>.
8+
--
79
-- <br />Class <a href="StrArray.html">StrArray</a>
810
-- <br />Class <a href="Repository.html">Repository</a>
911
-- <br />Class <a href="Config.html">Config</a>
@@ -26,10 +28,10 @@
2628
-- <br />Class <a href="Reference.html">Reference</a>
2729
module("git2")
2830

29-
--- module function
31+
--- module function.
3032
--
31-
-- @name git2.version
3233
-- @return <code>nil</code>.
34+
-- @name git2.version
3335
function git2.version()
3436
end
3537

git2/Blob.luadoc

Lines changed: 42 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,77 +5,97 @@
55
--- Class "Blob".
66
--
77
-- Extends <a href="Object.html">Object</a><br />
8-
-- <br />
98
module("Blob")
109

11-
--- Create a new Blob object
10+
--- Create a new Blob object.
1211
--
13-
-- @name Blob.lookup
14-
-- @param repo Must be of type `Repository`.
15-
-- @param id Must be of type `OID`.
16-
-- @return <code>Blob</code> or <code>nil</code> on error.
12+
-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/blob/git_blob_lookup">git_blob_lookup</a>:<p><p>
13+
-- @param repo the repo to use when locating the blob.. Must be of type <a href="Repository.html">Repository</a>.
14+
-- @param id identity of the blob to locate.. Must be of type <a href="OID.html">OID</a>.
15+
-- @return <a href="Blob.html">Blob</a> or <code>nil</code> on error.
1716
-- @return Error string.
17+
-- @name Blob.lookup
1818
function Blob.lookup(repo, id)
1919
end
2020

21-
--- module function
21+
--- module function.
2222
--
23-
-- @name Blob.fromfile
24-
-- @param repo Must be of type `Repository`.
25-
-- @param path Must be of type `string`.
26-
-- @return <code>OID</code> or <code>nil</code> on error.
23+
-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/blob/git_blob_create_fromfile">git_blob_create_fromfile</a>:<p><p>
24+
-- @param repo repository where the blob will be written. this repository cannot be bare. Must be of type <a href="Repository.html">Repository</a>.
25+
-- @param path file from which the blob will be created, relative to the repository's working dir. Must be of type <code>string</code>.
26+
-- @return <a href="OID.html">OID</a> or <code>nil</code> on error.
2727
-- @return Error string.
28+
-- @name Blob.fromfile
2829
function Blob.fromfile(repo, path)
2930
end
3031

31-
--- module function
32+
--- module function.
3233
--
33-
-- @name Blob.frombuffer
34-
-- @param repo Must be of type `Repository`.
35-
-- @param buffer Must be of type `string`.
36-
-- @return <code>OID</code> or <code>nil</code> on error.
34+
-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/blob/git_blob_create_frombuffer">git_blob_create_frombuffer</a>:<p><p>
35+
-- @param repo repository where to blob will be written. Must be of type <a href="Repository.html">Repository</a>.
36+
-- @param buffer data to be written into the blob. Must be of type <code>string</code>.
37+
-- @return <a href="OID.html">OID</a> or <code>nil</code> on error.
3738
-- @return Error string.
39+
-- @name Blob.frombuffer
3840
function Blob.frombuffer(repo, buffer)
3941
end
4042

4143
--- object method.
4244
--
43-
-- @name Blob:rawcontent
45+
-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/blob/git_blob_rawcontent">git_blob_rawcontent</a>:<p><p>A pointer to the raw content of a blob is returned;
46+
-- this pointer is owned internally by the object and shall
47+
-- not be free'd. The pointer may be invalidated at a later
48+
-- time.
49+
-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/blob/git_blob_rawsize">git_blob_rawsize</a>:<p><p>
4450
-- @return <code>string</code>.
51+
-- @name Blob:rawcontent
4552
function Blob:rawcontent()
4653
end
4754

4855
--- object method.
4956
--
50-
-- @name Blob:rawsize
57+
-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/blob/git_blob_rawsize">git_blob_rawsize</a>:<p><p>
5158
-- @return <code>integer</code>.
59+
-- @name Blob:rawsize
5260
function Blob:rawsize()
5361
end
5462

55-
--- Destroy this object.
63+
--- Destroy this object (will be called by Garbage Collector).
5664
--
65+
-- <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
66+
-- object; note that git_objects are owned and cached by the repository
67+
-- so the object may or may not be freed after this library call,
68+
-- depending on how agressive is the caching mechanism used
69+
-- by the repository.<p> IMPORTANT:
70+
-- It *is* necessary to call this method when you stop using
71+
-- an object. Failure to do so will cause a memory leak.
5772
-- @name Object:free
5873
function Object:free()
5974
end
6075

6176
--- object method.
6277
--
78+
-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/object/git_object_id">git_object_id</a>:<p><p>
79+
-- @return <a href="OID.html">OID</a>.
6380
-- @name Object:id
64-
-- @return <code>OID</code>.
6581
function Object:id()
6682
end
6783

6884
--- object method.
6985
--
70-
-- @name Object:type
86+
-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/object/git_object_type">git_object_type</a>:<p><p>
7187
-- @return <code>string</code>.
88+
-- @name Object:type
7289
function Object:type()
7390
end
7491

7592
--- object method.
7693
--
94+
-- <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
95+
-- returned pointer will invalidate the actual object.<p> Any other operation may be run on the repository without
96+
-- affecting the object.
97+
-- @return <a href="Repository.html">Repository</a>.
7798
-- @name Object:owner
78-
-- @return <code>Repository</code>.
7999
function Object:owner()
80100
end
81101

git2/Commit.luadoc

Lines changed: 57 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -5,133 +5,156 @@
55
--- Class "Commit".
66
--
77
-- Extends <a href="Object.html">Object</a><br />
8-
-- <br />
98
module("Commit")
109

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

21-
--- module function
21+
--- module function.
2222
--
23-
-- @name Commit.create
24-
-- @param oid Must be of type `OID`.
25-
-- @param repo Must be of type `Repository`.
26-
-- @param update_ref Must be of type `string`.
27-
-- @param author Must be of type `Signature`.
28-
-- @param committer Must be of type `Signature`.
29-
-- @param message_encoding Must be of type `string`.
30-
-- @param message Must be of type `string`.
31-
-- @param tree Must be of type `Tree`.
32-
-- @param parent Must be of type `Commit`.
23+
-- @param oid Must be of type <a href="OID.html">OID</a>.
24+
-- @param repo Must be of type <a href="Repository.html">Repository</a>.
25+
-- @param update_ref Must be of type <code>string</code>.
26+
-- @param author Must be of type <a href="Signature.html">Signature</a>.
27+
-- @param committer Must be of type <a href="Signature.html">Signature</a>.
28+
-- @param message_encoding Must be of type <code>string</code>.
29+
-- @param message Must be of type <code>string</code>.
30+
-- @param tree Must be of type <a href="Tree.html">Tree</a>.
31+
-- @param parent Must be of type <a href="Commit.html">Commit</a>.
3332
-- @return <code>true</code> if no error.
3433
-- @return Error string.
34+
-- @name Commit.create
3535
function Commit.create(oid, repo, update_ref, author, committer, message_encoding, message, tree, parent)
3636
end
3737

3838
--- object method.
3939
--
40+
-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/commit/git_commit_id">git_commit_id</a>:<p><p>
41+
-- @return <a href="OID.html">OID</a>.
4042
-- @name Commit:id
41-
-- @return <code>OID</code>.
4243
function Commit:id()
4344
end
4445

4546
--- object method.
4647
--
47-
-- @name Commit:message_encoding
48+
-- <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
49+
-- in the commit is missing; in that case UTF-8 is assumed.
4850
-- @return <code>string</code>.
51+
-- @name Commit:message_encoding
4952
function Commit:message_encoding()
5053
end
5154

5255
--- object method.
5356
--
54-
-- @name Commit:message
57+
-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/commit/git_commit_message">git_commit_message</a>:<p><p>
5558
-- @return <code>string</code>.
59+
-- @name Commit:message
5660
function Commit:message()
5761
end
5862

5963
--- object method.
6064
--
61-
-- @name Commit:time
65+
-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/commit/git_commit_time">git_commit_time</a>:<p><p>
6266
-- @return <code>integer</code>.
67+
-- @name Commit:time
6368
function Commit:time()
6469
end
6570

6671
--- object method.
6772
--
68-
-- @name Commit:time_offset
73+
-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/commit/git_commit_time_offset">git_commit_time_offset</a>:<p><p>
6974
-- @return <code>integer</code>.
75+
-- @name Commit:time_offset
7076
function Commit:time_offset()
7177
end
7278

7379
--- object method.
7480
--
81+
-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/commit/git_commit_committer">git_commit_committer</a>:<p><p>
82+
-- @return <a href="Signature.html">Signature</a>.
7583
-- @name Commit:committer
76-
-- @return <code>Signature</code>.
7784
function Commit:committer()
7885
end
7986

8087
--- object method.
8188
--
89+
-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/commit/git_commit_author">git_commit_author</a>:<p><p>
90+
-- @return <a href="Signature.html">Signature</a>.
8291
-- @name Commit:author
83-
-- @return <code>Signature</code>.
8492
function Commit:author()
8593
end
8694

8795
--- object method.
8896
--
89-
-- @name Commit:tree
90-
-- @return <code>Tree</code> or <code>nil</code> on error.
97+
-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/commit/git_commit_tree">git_commit_tree</a>:<p><p>
98+
-- @return <a href="Tree.html">Tree</a> or <code>nil</code> on error.
9199
-- @return Error string.
100+
-- @name Commit:tree
92101
function Commit:tree()
93102
end
94103

95104
--- object method.
96105
--
97-
-- @name Commit:parentcount
106+
-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/commit/git_commit_parentcount">git_commit_parentcount</a>:<p><p>
98107
-- @return <code>integer</code>.
108+
-- @name Commit:parentcount
99109
function Commit:parentcount()
100110
end
101111

102112
--- object method.
103113
--
104-
-- @name Commit:parent
105-
-- @param n Must be of type `integer`.
106-
-- @return <code>Commit</code> or <code>nil</code> on error.
114+
-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/commit/git_commit_parent">git_commit_parent</a>:<p><p>
115+
-- @param n the position of the parent (from 0 to `parentcount`). Must be of type <code>integer</code>.
116+
-- @return <a href="Commit.html">Commit</a> or <code>nil</code> on error.
107117
-- @return Error string.
118+
-- @name Commit:parent
108119
function Commit:parent(n)
109120
end
110121

111-
--- Destroy this object.
122+
--- Destroy this object (will be called by Garbage Collector).
112123
--
124+
-- <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
125+
-- object; note that git_objects are owned and cached by the repository
126+
-- so the object may or may not be freed after this library call,
127+
-- depending on how agressive is the caching mechanism used
128+
-- by the repository.<p> IMPORTANT:
129+
-- It *is* necessary to call this method when you stop using
130+
-- an object. Failure to do so will cause a memory leak.
113131
-- @name Object:free
114132
function Object:free()
115133
end
116134

117135
--- object method.
118136
--
137+
-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/object/git_object_id">git_object_id</a>:<p><p>
138+
-- @return <a href="OID.html">OID</a>.
119139
-- @name Object:id
120-
-- @return <code>OID</code>.
121140
function Object:id()
122141
end
123142

124143
--- object method.
125144
--
126-
-- @name Object:type
145+
-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/object/git_object_type">git_object_type</a>:<p><p>
127146
-- @return <code>string</code>.
147+
-- @name Object:type
128148
function Object:type()
129149
end
130150

131151
--- object method.
132152
--
153+
-- <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
154+
-- returned pointer will invalidate the actual object.<p> Any other operation may be run on the repository without
155+
-- affecting the object.
156+
-- @return <a href="Repository.html">Repository</a>.
133157
-- @name Object:owner
134-
-- @return <code>Repository</code>.
135158
function Object:owner()
136159
end
137160

0 commit comments

Comments
 (0)