Skip to content

Commit 55ea72f

Browse files
author
John Haley
committed
Bump to 0.16.0 and 0.17.0
1 parent 990337f commit 55ea72f

File tree

33 files changed

+479
-109
lines changed

33 files changed

+479
-109
lines changed

_config.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@ title: NodeGit
33
description: Asynchronous native Node bindings to libgit2
44
url: "http://nodegit.org"
55
date_format: "ordinal"
6-
current_nodegit_version: 0.15.1
6+
current_nodegit_version: 0.17.0
77
other_nodegit_versions:
88
- HEAD
9+
- 0.17.0
10+
- 0.16.0
911
- 0.15.1
1012
- 0.14.1
1113
- 0.14.0

api/branch/index.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,12 @@ Branch.create(repo, branch_name, target, force).then(function(reference) {
3939
| --- | --- |
4040
| [Reference](/api/reference/) | the underlying reference. |
4141

42-
## <a name="createFromAnnotated"></a><span>Branch.</span>createFromAnnotated <span class="tags"><span class="sync">Sync</span></span>
42+
## <a name="createFromAnnotated"></a><span>Branch.</span>createFromAnnotated <span class="tags"><span class="async">Async</span></span>
4343

4444
```js
45-
var reference = Branch.createFromAnnotated(repository, branch_name, commit, force);
45+
Branch.createFromAnnotated(repository, branch_name, commit, force).then(function(reference) {
46+
// Use reference
47+
});
4648
```
4749

4850
| Parameters | Type | |

api/checkout/index.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Patch head checkout to automatically coerce objects.
3333
## <a name="index"></a><span>Checkout.</span>index <span class="tags"><span class="async">Async</span></span>
3434

3535
```js
36-
Checkout.index(repo, The, [options]).then(function() {
36+
Checkout.index(repo, index, [options]).then(function() {
3737
// checkout complete
3838
});
3939
```
@@ -43,7 +43,7 @@ Patch index checkout to automatically coerce objects.
4343
| Parameters | Type | |
4444
| --- | --- | --- |
4545
| repo | [Repository](/api/repository/) | The repo to checkout an index |
46-
| The | [Index](/api/index/) | index to checkout |
46+
| index | [Index](/api/index/) | The index to checkout |
4747
| [options] | [CheckoutOptions](/api/checkout_options/) | Options for the checkout |
4848

4949
## <a name="initOptions"></a><span>Checkout.</span>initOptions <span class="tags"><span class="sync">Sync</span></span>
@@ -74,7 +74,7 @@ Patch tree checkout to automatically coerce objects.
7474
| Parameters | Type | |
7575
| --- | --- | --- |
7676
| repo | [Repository](/api/repository/) | |
77-
| treeish | [Oid](/api/oid/), [Tree](/api/tree/), [Commit](/api/commit/), [Reference](/api/reference/) | |
77+
| treeish | String, [Tree](/api/tree/), [Commit](/api/commit/), [Reference](/api/reference/) | |
7878
| [options] | [CheckoutOptions](/api/checkout_options/) | |
7979

8080
## <a name="NOTIFY"></a><span>Checkout.</span>NOTIFY <span class="tags"><span class="enum">ENUM</span></span>

api/commit/index.md

+9-13
Original file line numberDiff line numberDiff line change
@@ -149,24 +149,24 @@ Commit.lookupPrefix(repo, id, len).then(function(commit) {
149149
| --- | --- |
150150
| [Commit](/api/commit/) | |
151151

152-
## <a name="amend"></a><span>Commit#</span>amend <span class="tags"><span class="sync">Sync</span></span>
152+
## <a name="amend"></a><span>Commit#</span>amend <span class="tags"><span class="async">Async</span></span>
153153

154154
```js
155-
var oid = commit.amend(update_ref, author, committer, message_encoding, message, tree);
155+
commit.amend(update_ref, author, committer, message_encoding, message, tree, callback).then(function() {
156+
// method complete});
156157
```
157158
159+
Amend a commit
160+
158161
| Parameters | Type |
159162
| --- | --- | --- |
160163
| update_ref | String | |
161164
| author | [Signature](/api/signature/) | |
162165
| committer | [Signature](/api/signature/) | |
163166
| message_encoding | String | |
164167
| message | String | |
165-
| tree | [Tree](/api/tree/) | |
166-
167-
| Returns | |
168-
| --- | --- |
169-
| [Oid](/api/oid/) | |
168+
| tree | [Tree](/api/tree/), [Oid](/api/oid/) | |
169+
| callback | [Oid](/api/oid/) | |
170170
171171
## <a name="author"></a><span>Commit#</span>author <span class="tags"><span class="sync">Sync</span></span>
172172
@@ -481,14 +481,10 @@ var result = commit.parentcount();
481481
## <a name="parents"></a><span>Commit#</span>parents <span class="tags"><span class="sync">Sync</span></span>
482482
483483
```js
484-
var arrayOid = commit.parents(callback);
484+
var arrayOid = commit.parents();
485485
```
486486
487-
Retrieve the commit"s parent shas.
488-
489-
| Parameters | Type |
490-
| --- | --- | --- |
491-
| callback | Function | |
487+
Retrieve the commit's parent shas.
492488
493489
| Returns | |
494490
| --- | --- |

api/diff/index.md

+36
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ return_to:
88
"API Documentation Index": /api/
99
sections:
1010
"blobToBuffer": "#blobToBuffer"
11+
"fromBuffer": "#fromBuffer"
1112
"indexToIndex": "#indexToIndex"
1213
"indexToWorkdir": "#indexToWorkdir"
1314
"treeToIndex": "#treeToIndex"
@@ -20,6 +21,7 @@ sections:
2021
"#merge": "#merge"
2122
"#numDeltas": "#numDeltas"
2223
"#patches": "#patches"
24+
"#toBuf": "#toBuf"
2325
"DELTA": "#DELTA"
2426
"FIND": "#FIND"
2527
"FLAG": "#FLAG"
@@ -51,6 +53,23 @@ Directly run a diff between a blob and a buffer.
5153
| hunk_cb | Function | Callback for each hunk in diff; can be NULL |
5254
| line_cb | Function | Callback for each line in diff; can be NULL |
5355
56+
## <a name="fromBuffer"></a><span>Diff.</span>fromBuffer <span class="tags"><span class="async">Async</span></span>
57+
58+
```js
59+
Diff.fromBuffer(content, content_len).then(function(diff) {
60+
// Use diff
61+
});
62+
```
63+
64+
| Parameters | Type | |
65+
| --- | --- | --- |
66+
| content | String | The contents of a patch file |
67+
| content_len | Number | The length of the patch file contents |
68+
69+
| Returns | |
70+
| --- | --- |
71+
| [Diff](/api/diff/) | |
72+
5473
## <a name="indexToIndex"></a><span>Diff.</span>indexToIndex <span class="tags"><span class="async">Async</span></span>
5574
5675
```js
@@ -244,6 +263,23 @@ Retrieve patches in this difflist
244263
| --- | --- |
245264
| Array&lt;[ConvenientPatch](/api/convenient_patch/)&gt; | a promise that resolves to an array of ConvenientPatches |
246265
266+
## <a name="toBuf"></a><span>Diff#</span>toBuf <span class="tags"><span class="async">Async</span></span>
267+
268+
```js
269+
diff.toBuf(format).then(function(buf) {
270+
// Use buf
271+
});
272+
```
273+
274+
| Parameters | Type |
275+
| --- | --- | --- |
276+
| format | Number | A git_diff_format_t value to pick the text format. |
277+
278+
| Returns | |
279+
| --- | --- |
280+
| [Buf](/api/buf/) | a user-allocated git_buf that will
281+
contain the diff text |
282+
247283
## <a name="DELTA"></a><span>Diff.</span>DELTA <span class="tags"><span class="enum">ENUM</span></span>
248284
249285
| Flag | Value |

api/diff_binary/index.md

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ sections:
2323

2424
| Variable | Type |
2525
| --- | --- |
26+
| <a name="containsData"></a>containsData | Number |
2627
| <a name="newFile"></a>newFile | DiffBinaryFile |
2728
| <a name="oldFile"></a>oldFile | DiffBinaryFile |
2829

api/diff_file/index.md

+1
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ Returns the file's size
8181
| --- | --- |
8282
| <a name="flags"></a>flags | Number |
8383
| <a name="id"></a>id | Oid |
84+
| <a name="idAbbrev"></a>idAbbrev | Number |
8485
| <a name="mode"></a>mode | Number |
8586
| <a name="path"></a>path | String |
8687
| <a name="size"></a>size | Number |

api/diff_line/index.md

+13
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ return_to:
88
"API Documentation Index": /api/
99
sections:
1010
"#content": "#content"
11+
"#rawContent": "#rawContent"
1112
"Instance Variables": "#ivars"
1213
---
1314

@@ -23,6 +24,18 @@ The relevant line
2324
| --- | --- |
2425
| String | |
2526

27+
## <a name="rawContent"></a><span>DiffLine#</span>rawContent <span class="tags"><span class="sync">Sync</span></span>
28+
29+
```js
30+
var string = diffLine.rawContent();
31+
```
32+
33+
The non utf8 translated text
34+
35+
| Returns | |
36+
| --- | --- |
37+
| String | |
38+
2639
## <a name="ivars"></a>Instance Variables
2740

2841
| Variable | Type |

api/error/index.md

+1
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ sections:
7878
| <span>Error.ERROR.</span>GITERR_DESCRIBE | 28 |
7979
| <span>Error.ERROR.</span>GITERR_REBASE | 29 |
8080
| <span>Error.ERROR.</span>GITERR_FILESYSTEM | 30 |
81+
| <span>Error.ERROR.</span>GITERR_PATCH | 31 |
8182

8283
## <a name="ivars"></a>Instance Variables
8384

api/filter/index.md

+15
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ return_to:
88
"API Documentation Index": /api/
99
sections:
1010
"listContains": "#listContains"
11+
"listLength": "#listLength"
1112
"listNew": "#listNew"
1213
"listStreamBlob": "#listStreamBlob"
1314
"listStreamData": "#listStreamData"
@@ -35,6 +36,20 @@ var result = Filter.listContains(filters, name);
3536
| --- | --- |
3637
| Number | 1 if the filter is in the list, 0 otherwise |
3738

39+
## <a name="listLength"></a><span>Filter.</span>listLength <span class="tags"><span class="sync">Sync</span><span class="experimental">Experimental</span></span>
40+
41+
```js
42+
var result = Filter.listLength(fl);
43+
```
44+
45+
| Parameters | Type | |
46+
| --- | --- | --- |
47+
| fl | [FilterList](/api/filter_list/) | A filter list |
48+
49+
| Returns | |
50+
| --- | --- |
51+
| Number | The number of filters in the list |
52+
3853
## <a name="listNew"></a><span>Filter.</span>listNew <span class="tags"><span class="async">Async</span><span class="experimental">Experimental</span></span>
3954

4055
```js

api/hashsig/index.md

+19
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,31 @@ menu_item: api
77
return_to:
88
"API Documentation Index": /api/
99
sections:
10+
"create": "#create"
1011
"createFromFile": "#createFromFile"
1112
"#compare": "#compare"
1213
"#free": "#free"
1314
"OPTION": "#OPTION"
1415
---
1516

17+
## <a name="create"></a><span>Hashsig.</span>create <span class="tags"><span class="async">Async</span><span class="experimental">Experimental</span></span>
18+
19+
```js
20+
Hashsig.create(buf, buflen, opts).then(function(hashsig) {
21+
// Use hashsig
22+
});
23+
```
24+
25+
| Parameters | Type | |
26+
| --- | --- | --- |
27+
| buf | String | The input buffer. |
28+
| buflen | Number | The input buffer size. |
29+
| opts | Number | The signature computation options (see above). |
30+
31+
| Returns | |
32+
| --- | --- |
33+
| [Hashsig](/api/hashsig/) | The computed similarity signature. |
34+
1635
## <a name="createFromFile"></a><span>Hashsig.</span>createFromFile <span class="tags"><span class="async">Async</span><span class="experimental">Experimental</span></span>
1736

1837
```js

0 commit comments

Comments
 (0)