Skip to content

Commit 075d481

Browse files
committed
Documentation for codegen
1 parent 5915582 commit 075d481

22 files changed

+630
-0
lines changed

src/blob.cc

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ git_blob *GitBlob::GetValue() {
7070
}
7171

7272

73+
/**
74+
* @return {GitOid} result
75+
*/
7376
Handle<Value> GitBlob::Oid(const Arguments& args) {
7477
HandleScope scope;
7578

@@ -84,6 +87,9 @@ Handle<Value> GitBlob::Oid(const Arguments& args) {
8487
return scope.Close(to);
8588
}
8689

90+
/**
91+
* @return {Wrapper} result
92+
*/
8793
Handle<Value> GitBlob::Content(const Arguments& args) {
8894
HandleScope scope;
8995

@@ -97,6 +103,9 @@ Handle<Value> GitBlob::Content(const Arguments& args) {
97103
return scope.Close(to);
98104
}
99105

106+
/**
107+
* @return {Number} result
108+
*/
100109
Handle<Value> GitBlob::Size(const Arguments& args) {
101110
HandleScope scope;
102111

@@ -110,6 +119,11 @@ Handle<Value> GitBlob::Size(const Arguments& args) {
110119
return scope.Close(to);
111120
}
112121

122+
/**
123+
* @param {Repository} repo
124+
* @param {String} path
125+
* @param {Oid} callback
126+
*/
113127
Handle<Value> GitBlob::CreateFromFile(const Arguments& args) {
114128
HandleScope scope;
115129
if (args.Length() == 0 || !args[0]->IsObject()) {
@@ -188,6 +202,12 @@ void GitBlob::CreateFromFileAfterWork(uv_work_t *req) {
188202
delete baton;
189203
}
190204

205+
/**
206+
* @param {Repository} repo
207+
* @param {Buffer} buffer
208+
* @param {Number} len
209+
* @param {Oid} callback
210+
*/
191211
Handle<Value> GitBlob::CreateFromBuffer(const Arguments& args) {
192212
HandleScope scope;
193213
if (args.Length() == 0 || !args[0]->IsObject()) {
@@ -272,6 +292,8 @@ void GitBlob::CreateFromBufferAfterWork(uv_work_t *req) {
272292
delete baton;
273293
}
274294

295+
/**
296+
*/
275297
Handle<Value> GitBlob::IsBinary(const Arguments& args) {
276298
HandleScope scope;
277299

src/branch.cc

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,13 @@ git_branch *Branch::GetValue() {
7171
}
7272

7373

74+
/**
75+
* @param {Repository} repo
76+
* @param {String} branch_name
77+
* @param {Commit} target
78+
* @param {Number} force
79+
* @return {Reference} out
80+
*/
7481
Handle<Value> Branch::Create(const Arguments& args) {
7582
HandleScope scope;
7683
if (args.Length() == 0 || !args[0]->IsObject()) {
@@ -110,6 +117,9 @@ Handle<Value> Branch::Create(const Arguments& args) {
110117
return scope.Close(to);
111118
}
112119

120+
/**
121+
* @param {Reference} branch
122+
*/
113123
Handle<Value> Branch::Delete(const Arguments& args) {
114124
HandleScope scope;
115125
if (args.Length() == 0 || !args[0]->IsObject()) {
@@ -128,6 +138,12 @@ Handle<Value> Branch::Delete(const Arguments& args) {
128138
return Undefined();
129139
}
130140

141+
/**
142+
* @param {Repository} repo
143+
* @param {Number} list_flags
144+
* @param {BranchForeachCb} branch_cb
145+
* @param {void} payload
146+
*/
131147
Handle<Value> Branch::Foreach(const Arguments& args) {
132148
HandleScope scope;
133149
if (args.Length() == 0 || !args[0]->IsObject()) {
@@ -161,6 +177,12 @@ Handle<Value> Branch::Foreach(const Arguments& args) {
161177
return Undefined();
162178
}
163179

180+
/**
181+
* @param {Reference} branch
182+
* @param {String} new_branch_name
183+
* @param {Number} force
184+
* @return {Reference} out
185+
*/
164186
Handle<Value> Branch::Move(const Arguments& args) {
165187
HandleScope scope;
166188
if (args.Length() == 0 || !args[0]->IsObject()) {
@@ -195,6 +217,12 @@ Handle<Value> Branch::Move(const Arguments& args) {
195217
return scope.Close(to);
196218
}
197219

220+
/**
221+
* @param {Repository} repo
222+
* @param {String} branch_name
223+
* @param {BranchT} branch_type
224+
* @return {Reference} out
225+
*/
198226
Handle<Value> Branch::Lookup(const Arguments& args) {
199227
HandleScope scope;
200228
if (args.Length() == 0 || !args[0]->IsObject()) {
@@ -229,6 +257,10 @@ Handle<Value> Branch::Lookup(const Arguments& args) {
229257
return scope.Close(to);
230258
}
231259

260+
/**
261+
* @param {Reference} ref
262+
* @return {String} out
263+
*/
232264
Handle<Value> Branch::Name(const Arguments& args) {
233265
HandleScope scope;
234266
if (args.Length() == 0 || !args[0]->IsObject()) {
@@ -251,6 +283,10 @@ Handle<Value> Branch::Name(const Arguments& args) {
251283
return scope.Close(to);
252284
}
253285

286+
/**
287+
* @param {Reference} branch
288+
* @return {Reference} out
289+
*/
254290
Handle<Value> Branch::Upstream(const Arguments& args) {
255291
HandleScope scope;
256292
if (args.Length() == 0 || !args[0]->IsObject()) {
@@ -273,6 +309,10 @@ Handle<Value> Branch::Upstream(const Arguments& args) {
273309
return scope.Close(to);
274310
}
275311

312+
/**
313+
* @param {Reference} branch
314+
* @param {String} upstream_name
315+
*/
276316
Handle<Value> Branch::SetUpstream(const Arguments& args) {
277317
HandleScope scope;
278318
if (args.Length() == 0 || !args[0]->IsObject()) {
@@ -298,6 +338,12 @@ Handle<Value> Branch::SetUpstream(const Arguments& args) {
298338
return Undefined();
299339
}
300340

341+
/**
342+
* @param {String} tracking_branch_name_out
343+
* @param {Number} buffer_size
344+
* @param {Repository} repo
345+
* @param {String} canonical_branch_name
346+
*/
301347
Handle<Value> Branch::UpstreamName(const Arguments& args) {
302348
HandleScope scope;
303349
if (args.Length() == 0 || !args[0]->IsString()) {
@@ -335,6 +381,9 @@ Handle<Value> Branch::UpstreamName(const Arguments& args) {
335381
return Undefined();
336382
}
337383

384+
/**
385+
* @param {Reference} branch
386+
*/
338387
Handle<Value> Branch::IsHead(const Arguments& args) {
339388
HandleScope scope;
340389
if (args.Length() == 0 || !args[0]->IsObject()) {
@@ -353,6 +402,12 @@ Handle<Value> Branch::IsHead(const Arguments& args) {
353402
return Undefined();
354403
}
355404

405+
/**
406+
* @param {String} remote_name_out
407+
* @param {Number} buffer_size
408+
* @param {Repository} repo
409+
* @param {String} canonical_branch_name
410+
*/
356411
Handle<Value> Branch::RemoteName(const Arguments& args) {
357412
HandleScope scope;
358413
if (args.Length() == 0 || !args[0]->IsString()) {

src/commit.cc

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ git_commit *GitCommit::GetValue() {
7575
}
7676

7777

78+
/**
79+
* @return {GitOid} result
80+
*/
7881
Handle<Value> GitCommit::Oid(const Arguments& args) {
7982
HandleScope scope;
8083

@@ -89,6 +92,9 @@ Handle<Value> GitCommit::Oid(const Arguments& args) {
8992
return scope.Close(to);
9093
}
9194

95+
/**
96+
* @return {String} result
97+
*/
9298
Handle<Value> GitCommit::MessageEncoding(const Arguments& args) {
9399
HandleScope scope;
94100

@@ -102,6 +108,9 @@ Handle<Value> GitCommit::MessageEncoding(const Arguments& args) {
102108
return scope.Close(to);
103109
}
104110

111+
/**
112+
* @return {String} result
113+
*/
105114
Handle<Value> GitCommit::Message(const Arguments& args) {
106115
HandleScope scope;
107116

@@ -115,6 +124,9 @@ Handle<Value> GitCommit::Message(const Arguments& args) {
115124
return scope.Close(to);
116125
}
117126

127+
/**
128+
* @return {Number} result
129+
*/
118130
Handle<Value> GitCommit::Time(const Arguments& args) {
119131
HandleScope scope;
120132

@@ -128,6 +140,9 @@ Handle<Value> GitCommit::Time(const Arguments& args) {
128140
return scope.Close(to);
129141
}
130142

143+
/**
144+
* @return {Integer} result
145+
*/
131146
Handle<Value> GitCommit::Offset(const Arguments& args) {
132147
HandleScope scope;
133148

@@ -141,6 +156,9 @@ Handle<Value> GitCommit::Offset(const Arguments& args) {
141156
return scope.Close(to);
142157
}
143158

159+
/**
160+
* @return {GitSignature} result
161+
*/
144162
Handle<Value> GitCommit::Committer(const Arguments& args) {
145163
HandleScope scope;
146164

@@ -155,6 +173,9 @@ Handle<Value> GitCommit::Committer(const Arguments& args) {
155173
return scope.Close(to);
156174
}
157175

176+
/**
177+
* @return {GitSignature} result
178+
*/
158179
Handle<Value> GitCommit::Author(const Arguments& args) {
159180
HandleScope scope;
160181

@@ -169,6 +190,9 @@ Handle<Value> GitCommit::Author(const Arguments& args) {
169190
return scope.Close(to);
170191
}
171192

193+
/**
194+
* @return {GitOid} result
195+
*/
172196
Handle<Value> GitCommit::TreeId(const Arguments& args) {
173197
HandleScope scope;
174198

@@ -183,6 +207,9 @@ Handle<Value> GitCommit::TreeId(const Arguments& args) {
183207
return scope.Close(to);
184208
}
185209

210+
/**
211+
* @return {Uint32} result
212+
*/
186213
Handle<Value> GitCommit::ParentCount(const Arguments& args) {
187214
HandleScope scope;
188215

@@ -196,6 +223,10 @@ Handle<Value> GitCommit::ParentCount(const Arguments& args) {
196223
return scope.Close(to);
197224
}
198225

226+
/**
227+
* @param {Number} n
228+
* @return {GitOid} result
229+
*/
199230
Handle<Value> GitCommit::ParentId(const Arguments& args) {
200231
HandleScope scope;
201232
if (args.Length() == 0 || !args[0]->IsUint32()) {
@@ -215,6 +246,10 @@ Handle<Value> GitCommit::ParentId(const Arguments& args) {
215246
return scope.Close(to);
216247
}
217248

249+
/**
250+
* @param {Number} n
251+
* @return {Commit} ancestor
252+
*/
218253
Handle<Value> GitCommit::NthGenAncestor(const Arguments& args) {
219254
HandleScope scope;
220255
if (args.Length() == 0 || !args[0]->IsUint32()) {

src/diff_list.cc

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ git_diff_list *GitDiffList::GetValue() {
7272
}
7373

7474

75+
/**
76+
* @param {DiffList} from
77+
*/
7578
Handle<Value> GitDiffList::Merge(const Arguments& args) {
7679
HandleScope scope;
7780
if (args.Length() == 0 || !args[0]->IsObject()) {
@@ -91,6 +94,9 @@ Handle<Value> GitDiffList::Merge(const Arguments& args) {
9194
return Undefined();
9295
}
9396

97+
/**
98+
* @param {DiffFindOptions} options
99+
*/
94100
Handle<Value> GitDiffList::FindSimilar(const Arguments& args) {
95101
HandleScope scope;
96102
if (args.Length() == 0 || !args[0]->IsObject()) {
@@ -110,6 +116,9 @@ Handle<Value> GitDiffList::FindSimilar(const Arguments& args) {
110116
return Undefined();
111117
}
112118

119+
/**
120+
* @return {Uint32} result
121+
*/
113122
Handle<Value> GitDiffList::Size(const Arguments& args) {
114123
HandleScope scope;
115124

@@ -123,6 +132,11 @@ Handle<Value> GitDiffList::Size(const Arguments& args) {
123132
return scope.Close(to);
124133
}
125134

135+
/**
136+
* @param {DiffList} diff
137+
* @param {Number} type
138+
* @return {Uint32} result
139+
*/
126140
Handle<Value> GitDiffList::NumDeltasOfType(const Arguments& args) {
127141
HandleScope scope;
128142
if (args.Length() == 0 || !args[0]->IsObject()) {
@@ -145,6 +159,11 @@ Handle<Value> GitDiffList::NumDeltasOfType(const Arguments& args) {
145159
return scope.Close(to);
146160
}
147161

162+
/**
163+
* @param {Number} idx
164+
* @return {Patch} patch_out
165+
* @return {Delta} delta_out
166+
*/
148167
Handle<Value> GitDiffList::Patch(const Arguments& args) {
149168
HandleScope scope;
150169
if (args.Length() == 0 || !args[0]->IsUint32()) {

0 commit comments

Comments
 (0)