|
5 | 5 | --- Class "Commit". |
6 | 6 | -- |
7 | 7 | -- Extends <a href="Object.html">Object</a><br /> |
8 | | --- <br /> |
9 | 8 | module("Commit") |
10 | 9 |
|
11 | | ---- Create a new Commit object |
| 10 | +--- Create a new Commit object. |
12 | 11 | -- |
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. |
17 | 16 | -- @return Error string. |
| 17 | +-- @name Commit.lookup |
18 | 18 | function Commit.lookup(repo, id) |
19 | 19 | end |
20 | 20 |
|
21 | | ---- module function |
| 21 | +--- module function. |
22 | 22 | -- |
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>. |
33 | 32 | -- @return <code>true</code> if no error. |
34 | 33 | -- @return Error string. |
| 34 | +-- @name Commit.create |
35 | 35 | function Commit.create(oid, repo, update_ref, author, committer, message_encoding, message, tree, parent) |
36 | 36 | end |
37 | 37 |
|
38 | 38 | --- object method. |
39 | 39 | -- |
| 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>. |
40 | 42 | -- @name Commit:id |
41 | | --- @return <code>OID</code>. |
42 | 43 | function Commit:id() |
43 | 44 | end |
44 | 45 |
|
45 | 46 | --- object method. |
46 | 47 | -- |
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. |
48 | 50 | -- @return <code>string</code>. |
| 51 | +-- @name Commit:message_encoding |
49 | 52 | function Commit:message_encoding() |
50 | 53 | end |
51 | 54 |
|
52 | 55 | --- object method. |
53 | 56 | -- |
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> |
55 | 58 | -- @return <code>string</code>. |
| 59 | +-- @name Commit:message |
56 | 60 | function Commit:message() |
57 | 61 | end |
58 | 62 |
|
59 | 63 | --- object method. |
60 | 64 | -- |
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> |
62 | 66 | -- @return <code>integer</code>. |
| 67 | +-- @name Commit:time |
63 | 68 | function Commit:time() |
64 | 69 | end |
65 | 70 |
|
66 | 71 | --- object method. |
67 | 72 | -- |
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> |
69 | 74 | -- @return <code>integer</code>. |
| 75 | +-- @name Commit:time_offset |
70 | 76 | function Commit:time_offset() |
71 | 77 | end |
72 | 78 |
|
73 | 79 | --- object method. |
74 | 80 | -- |
| 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>. |
75 | 83 | -- @name Commit:committer |
76 | | --- @return <code>Signature</code>. |
77 | 84 | function Commit:committer() |
78 | 85 | end |
79 | 86 |
|
80 | 87 | --- object method. |
81 | 88 | -- |
| 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>. |
82 | 91 | -- @name Commit:author |
83 | | --- @return <code>Signature</code>. |
84 | 92 | function Commit:author() |
85 | 93 | end |
86 | 94 |
|
87 | 95 | --- object method. |
88 | 96 | -- |
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. |
91 | 99 | -- @return Error string. |
| 100 | +-- @name Commit:tree |
92 | 101 | function Commit:tree() |
93 | 102 | end |
94 | 103 |
|
95 | 104 | --- object method. |
96 | 105 | -- |
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> |
98 | 107 | -- @return <code>integer</code>. |
| 108 | +-- @name Commit:parentcount |
99 | 109 | function Commit:parentcount() |
100 | 110 | end |
101 | 111 |
|
102 | 112 | --- object method. |
103 | 113 | -- |
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. |
107 | 117 | -- @return Error string. |
| 118 | +-- @name Commit:parent |
108 | 119 | function Commit:parent(n) |
109 | 120 | end |
110 | 121 |
|
111 | | ---- Destroy this object. |
| 122 | +--- Destroy this object (will be called by Garbage Collector). |
112 | 123 | -- |
| 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. |
113 | 131 | -- @name Object:free |
114 | 132 | function Object:free() |
115 | 133 | end |
116 | 134 |
|
117 | 135 | --- object method. |
118 | 136 | -- |
| 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>. |
119 | 139 | -- @name Object:id |
120 | | --- @return <code>OID</code>. |
121 | 140 | function Object:id() |
122 | 141 | end |
123 | 142 |
|
124 | 143 | --- object method. |
125 | 144 | -- |
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> |
127 | 146 | -- @return <code>string</code>. |
| 147 | +-- @name Object:type |
128 | 148 | function Object:type() |
129 | 149 | end |
130 | 150 |
|
131 | 151 | --- object method. |
132 | 152 | -- |
| 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>. |
133 | 157 | -- @name Object:owner |
134 | | --- @return <code>Repository</code>. |
135 | 158 | function Object:owner() |
136 | 159 | end |
137 | 160 |
|
0 commit comments