Skip to content

Commit 6635c0f

Browse files
committed
Regenerating docs docs
1 parent bf20a3c commit 6635c0f

File tree

20 files changed

+587
-118
lines changed

20 files changed

+587
-118
lines changed

api/annotated_commit/index.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
---
2+
layout: default
3+
menu_item: api
4+
title: AnnotatedCommit
5+
description: Version 0.4.0
6+
menu_item: api
7+
return_to:
8+
"API Documentation Index": /api/
9+
sections:
10+
"fromFetchhead": "#fromFetchhead"
11+
"fromRef": "#fromRef"
12+
"lookup": "#lookup"
13+
"#free": "#free"
14+
"#id": "#id"
15+
---
16+
17+
## <a name="fromFetchhead"></a><span>AnnotatedCommit.</span>fromFetchhead <span class="tags"><span class="async">Async</span><span class="experimental">Experimental</span></span>
18+
19+
```js
20+
AnnotatedCommit.fromFetchhead(repo, branch_name, remote_url, id).then(function(annotatedCommit) {
21+
// Use annotatedCommit
22+
});
23+
```
24+
25+
| Parameters | Type | |
26+
| --- | --- | --- |
27+
| repo | [Repository](/api/repository/) | repository that contains the given commit |
28+
| branch_name | String | name of the (remote) branch |
29+
| remote_url | String | url of the remote |
30+
| id | [Oid](/api/oid/) | |
31+
32+
| Returns | |
33+
| --- | --- |
34+
| [AnnotatedCommit](/api/annotated_commit/) | |
35+
36+
## <a name="fromRef"></a><span>AnnotatedCommit.</span>fromRef <span class="tags"><span class="async">Async</span><span class="experimental">Experimental</span></span>
37+
38+
```js
39+
AnnotatedCommit.fromRef(repo, ref).then(function(annotatedCommit) {
40+
// Use annotatedCommit
41+
});
42+
```
43+
44+
| Parameters | Type | |
45+
| --- | --- | --- |
46+
| repo | [Repository](/api/repository/) | repository that contains the given reference |
47+
| ref | [Reference](/api/reference/) | reference to use to lookup the git_annotated_commit |
48+
49+
| Returns | |
50+
| --- | --- |
51+
| [AnnotatedCommit](/api/annotated_commit/) | |
52+
53+
## <a name="lookup"></a><span>AnnotatedCommit.</span>lookup <span class="tags"><span class="async">Async</span><span class="experimental">Experimental</span></span>
54+
55+
```js
56+
AnnotatedCommit.lookup(repo, id).then(function(annotatedCommit) {
57+
// Use annotatedCommit
58+
});
59+
```
60+
61+
| Parameters | Type | |
62+
| --- | --- | --- |
63+
| repo | [Repository](/api/repository/) | repository that contains the given commit |
64+
| id | [Oid](/api/oid/) | the commit object id to lookup |
65+
66+
| Returns | |
67+
| --- | --- |
68+
| [AnnotatedCommit](/api/annotated_commit/) | |
69+
70+
## <a name="free"></a><span>AnnotatedCommit#</span>free <span class="tags"><span class="sync">Sync</span><span class="experimental">Experimental</span></span>
71+
72+
```js
73+
annotatedCommit.free();
74+
```
75+
76+
## <a name="id"></a><span>AnnotatedCommit#</span>id <span class="tags"><span class="sync">Sync</span><span class="experimental">Experimental</span></span>
77+
78+
```js
79+
var oid = annotatedCommit.id();
80+
```
81+
82+
| Returns | |
83+
| --- | --- |
84+
| [Oid](/api/oid/) | commit id |
85+

api/blob/index.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ var buffer = blob.content();
116116

117117
Retrieve the content of the Blob.
118118

119-
120119
| Returns | |
121120
| --- | --- |
122121
| Buffer | Contents as a buffer. |
@@ -129,7 +128,6 @@ var number = blob.filemode();
129128

130129
Retrieve the Blob's type.
131130

132-
133131
| Returns | |
134132
| --- | --- |
135133
| Number | The filemode of the blob. |
@@ -199,7 +197,6 @@ var string = blob.toString();
199197

200198
Retrieve the Blob's content as String.
201199

202-
203200
| Returns | |
204201
| --- | --- |
205202
| String | Contents as a string. |

api/checkout/index.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ return_to:
88
"API Documentation Index": /api/
99
sections:
1010
"head": "#head"
11+
"index": "#index"
1112
"initOptions": "#initOptions"
1213
"tree": "#tree"
1314
"NOTIFY": "#NOTIFY"
@@ -24,12 +25,27 @@ Checkout.head(repo, [options]).then(function() {
2425

2526
Patch head checkout to automatically coerce objects.
2627

27-
2828
| Parameters | Type | |
2929
| --- | --- | --- |
3030
| repo | [Repository](/api/repository/) | The repo to checkout head |
3131
| [options] | [CheckoutOptions](/api/checkout_options/) | Options for the checkout |
3232

33+
## <a name="index"></a><span>Checkout.</span>index <span class="tags"><span class="async">Async</span></span>
34+
35+
```js
36+
Checkout.index(repo, The, [options]).then(function() {
37+
// checkout complete
38+
});
39+
```
40+
41+
Patch index checkout to automatically coerce objects.
42+
43+
| Parameters | Type | |
44+
| --- | --- | --- |
45+
| repo | [Repository](/api/repository/) | The repo to checkout an index |
46+
| The | [Index](/api/index/) | index to checkout |
47+
| [options] | [CheckoutOptions](/api/checkout_options/) | Options for the checkout |
48+
3349
## <a name="initOptions"></a><span>Checkout.</span>initOptions <span class="tags"><span class="sync">Sync</span></span>
3450

3551
```js
@@ -55,7 +71,6 @@ Checkout.tree(repo, treeish, [options]).then(function() {
5571

5672
Patch tree checkout to automatically coerce objects.
5773

58-
5974
| Parameters | Type | |
6075
| --- | --- | --- |
6176
| repo | [Repository](/api/repository/) | |

api/cherrypick/index.md

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,43 +12,50 @@ sections:
1212
"initOptions": "#initOptions"
1313
---
1414

15-
## <a name="cherrypick"></a><span>Cherrypick.</span>cherrypick <span class="tags"><span class="sync">Sync</span><span class="experimental">Experimental</span></span>
15+
## <a name="cherrypick"></a><span>Cherrypick.</span>cherrypick <span class="tags"><span class="async">Async</span></span>
1616

1717
```js
18-
var result = Cherrypick.cherrypick(repo, commit, cherrypick_options);
18+
Cherrypick.cherrypick(repo, commit, [options]).then(function(int) {
19+
// Use int
20+
});
1921
```
2022

23+
Cherrypick a commit and, changing the index and working directory
24+
2125
| Parameters | Type | |
2226
| --- | --- | --- |
23-
| repo | [Repository](/api/repository/) | the repository to cherry-pick |
24-
| commit | [Commit](/api/commit/) | the commit to cherry-pick |
25-
| cherrypick_options | [CherrypickOptions](/api/cherrypick_options/) | the cherry-pick options (or null for defaults) |
27+
| repo | [Repository](/api/repository/) | The repo to checkout head |
28+
| commit | [Commit](/api/commit/) | The commit to cherrypick |
29+
| [options] | [CherrypickOptions](/api/cherrypick_options/) | Options for the cherrypick |
2630

2731
| Returns | |
2832
| --- | --- |
29-
| Number | zero on success, -1 on failure. |
33+
| int | 0 on success, -1 on failure |
3034

31-
## <a name="commit"></a><span>Cherrypick.</span>commit <span class="tags"><span class="async">Async</span><span class="experimental">Experimental</span></span>
35+
## <a name="commit"></a><span>Cherrypick.</span>commit <span class="tags"><span class="async">Async</span></span>
3236

3337
```js
34-
Cherrypick.commit(repo, cherrypick_commit, our_commit, mainline, merge_options).then(function(index) {
35-
// Use index
38+
Cherrypick.commit(repo, cherrypick_commit, our_commit, mainline, [merge_options]).then(function(int) {
39+
// Use int
3640
});
3741
```
3842

43+
Cherrypicks the given commit against "our" commit, producing an index that
44+
reflects the result of the cherrypick. The index is not backed by a repo.
45+
3946
| Parameters | Type | |
4047
| --- | --- | --- |
41-
| repo | [Repository](/api/repository/) | the repository that contains the given commits |
42-
| cherrypick_commit | [Commit](/api/commit/) | the commit to cherry-pick |
43-
| our_commit | [Commit](/api/commit/) | the commit to revert against (eg, HEAD) |
44-
| mainline | Number | the parent of the revert commit, if it is a merge |
45-
| merge_options | [MergeOptions](/api/merge_options/) | the merge options (or null for defaults) |
48+
| repo | [Repository](/api/repository/) | The repo to cherrypick commits |
49+
| cherrypick_commit | [Commit](/api/commit/) | The commit to cherrypick |
50+
| our_commit | [Commit](/api/commit/) | The commit to revert against |
51+
| mainline | int | The parent of the revert commit (1 or 2) if it's a merge, 0 otherwise |
52+
| [merge_options] | [MergeOptions](/api/merge_options/) | Merge options for the cherrypick |
4653

4754
| Returns | |
4855
| --- | --- |
49-
| [Index](/api/index/) | |
56+
| int | 0 on success, -1 on failure |
5057

51-
## <a name="initOptions"></a><span>Cherrypick.</span>initOptions <span class="tags"><span class="sync">Sync</span><span class="experimental">Experimental</span></span>
58+
## <a name="initOptions"></a><span>Cherrypick.</span>initOptions <span class="tags"><span class="sync">Sync</span></span>
5259

5360
```js
5461
var result = Cherrypick.initOptions(opts, version);

api/clone/index.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ Clone.clone(url, local_path, [options]).then(function(repository) {
2222

2323
Patch repository cloning to automatically coerce objects.
2424

25-
2625
| Parameters | Type | |
2726
| --- | --- | --- |
2827
| url | String | url of the repository |

api/commit/index.md

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ sections:
1616
"#committer": "#committer"
1717
"#date": "#date"
1818
"#free": "#free"
19+
"#getDiff": "#getDiff"
1920
"#getEntry": "#getEntry"
2021
"#getParents": "#getParents"
2122
"#getTree": "#getTree"
@@ -36,6 +37,7 @@ sections:
3637
"#time": "#time"
3738
"#timeMs": "#timeMs"
3839
"#timeOffset": "#timeOffset"
40+
"#toString": "#toString"
3941
"#tree": "#tree"
4042
"#treeId": "#treeId"
4143
---
@@ -179,6 +181,25 @@ Retrieve the commit time as a Date object.
179181
commit.free();
180182
```
181183

184+
## <a name="getDiff"></a><span>Commit#</span>getDiff <span class="tags"><span class="async">Async</span></span>
185+
186+
```js
187+
commit.getDiff(callback).then(function(arrayDiff) {
188+
// Use arrayDiff
189+
});
190+
```
191+
192+
Generate an array of diff trees showing changes between this commit
193+
and its parent(s).
194+
195+
| Parameters | Type |
196+
| --- | --- | --- |
197+
| callback | Function | |
198+
199+
| Returns | |
200+
| --- | --- |
201+
| Array&lt;[Diff](/api/diff/)&gt; | an array of diffs |
202+
182203
## <a name="getEntry"></a><span>Commit#</span>getEntry <span class="tags"><span class="async">Async</span></span>
183204

184205
```js
@@ -190,7 +211,6 @@ commit.getEntry(path).then(function(treeEntry) {
190211
Retrieve the entry represented by path for this commit.
191212
Path must be relative to repository root.
192213

193-
194214
| Parameters | Type |
195215
| --- | --- | --- |
196216
| path | String | |
@@ -209,7 +229,6 @@ commit.getParents(limit, callback).then(function(arrayCommit) {
209229

210230
Retrieve the commit's parents as commit objects.
211231

212-
213232
| Parameters | Type |
214233
| --- | --- | --- |
215234
| limit | number | Optional amount of parents to return. |
@@ -229,7 +248,6 @@ commit.getTree().then(function(tree) {
229248

230249
Get the tree associated with this commit.
231250

232-
233251
| Returns | |
234252
| --- | --- |
235253
| [Tree](/api/tree/) | |
@@ -260,12 +278,11 @@ An EventEmitter is returned that will emit a "commit" event for each
260278
commit in the history, and one "end" event when the walk is completed.
261279
Don't forget to call `start()` on the returned event.
262280

263-
264281
| Fires | Sends |
265282
| --- | --- |
266283
| commit | [Commit](/api/commit/) |
267284
| end | Array&lt;[Commit](/api/commit/)&gt; |
268-
| error | Error |
285+
| error | [Error](/api/error/) |
269286

270287
| Returns | |
271288
| --- | --- |
@@ -385,7 +402,6 @@ var arrayOids = commit.parents(callback);
385402

386403
Retrieve the commit"s parent shas.
387404

388-
389405
| Parameters | Type |
390406
| --- | --- | --- |
391407
| callback | Function | |
@@ -458,6 +474,18 @@ var result = commit.timeOffset();
458474
| --- | --- |
459475
| Number | positive or negative timezone offset, in minutes from UTC |
460476

477+
## <a name="toString"></a><span>Commit#</span>toString <span class="tags"><span class="sync">Sync</span></span>
478+
479+
```js
480+
var string = commit.toString();
481+
```
482+
483+
The sha of this commit
484+
485+
| Returns | |
486+
| --- | --- |
487+
| String | |
488+
461489
## <a name="tree"></a><span>Commit#</span>tree <span class="tags"><span class="sync">Sync</span></span>
462490

463491
```js

api/convenient_hunk/index.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,19 @@ of the diff. Something like `@@ -169,14 +167,12 @@ ...`
2525
| --- | --- |
2626
| String | |
2727

28-
## <a name="lines"></a><span>ConvenientHunk#</span>lines <span class="tags"><span class="sync">Sync</span></span>
28+
## <a name="lines"></a><span>ConvenientHunk#</span>lines <span class="tags"><span class="async">Async</span></span>
2929

3030
```js
31-
var string = convenientHunk.lines();
31+
convenientHunk.lines().then(function(arrayConvenientLine) {
32+
// Use arrayConvenientLine
33+
});
3234
```
3335

3436
The lines in this hunk
3537

3638
| Returns | |
3739
| --- | --- |
38-
| String | array of strings |
40+
| Array&lt;[ConvenientLine](/api/convenient_line/)&gt; | a promise that resolves to an array of ConvenientLines |
3941

4042
## <a name="size"></a><span>ConvenientHunk#</span>size <span class="tags"><span class="sync">Sync</span></span>
4143

api/convenient_patch/index.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,19 @@ sections:
2323
"#status": "#status"
2424
---
2525

26-
## <a name="hunks"></a><span>ConvenientPatch#</span>hunks <span class="tags"><span class="sync">Sync</span></span>
26+
## <a name="hunks"></a><span>ConvenientPatch#</span>hunks <span class="tags"><span class="async">Async</span></span>
2727

2828
```js
29-
var convenientHunk = convenientPatch.hunks();
29+
convenientPatch.hunks().then(function(arrayConvenientHunk) {
30+
// Use arrayConvenientHunk
31+
});
3032
```
3133

3234
The hunks in this patch
3335

3436
| Returns | |
3537
| --- | --- |
36-
| [ConvenientHunk](/api/convenient_hunk/) | an array of ConvenientHunks |
38+
| Array&lt;[ConvenientHunk](/api/convenient_hunk/)&gt; | a promise that resolves to an array of ConvenientHunks |
3739

3840
## <a name="isAdded"></a><span>ConvenientPatch#</span>isAdded <span class="tags"><span class="sync">Sync</span></span>
3941

0 commit comments

Comments
 (0)