| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -10,6 +10,7 @@ sections: | |||
| 10 | 10 | "file": "#file" | |
| 11 | 11 | "initOptions": "#initOptions" | |
| 12 | 12 | "#buffer": "#buffer" | |
| 13 | + "#free": "#free" | ||
| 13 | 14 | "#getHunkByIndex": "#getHunkByIndex" | |
| 14 | 15 | "#getHunkByLine": "#getHunkByLine" | |
| 15 | 16 | "#getHunkCount": "#getHunkCount" | |
@@ -66,6 +67,12 @@ blame.buffer(buffer, buffer_len).then(function(blame) { | |||
| 66 | 67 | | --- | --- | | |
| 67 | 68 | | [Blame](/api/blame/) | | | |
| 68 | 69 | ||
| 70 | + ## <a name="free"></a><span>Blame#</span>free <span class="tags"><span class="sync">Sync</span><span class="experimental">Experimental</span></span> | ||
| 71 | + | ||
| 72 | + ```js | ||
| 73 | + blame.free(); | ||
| 74 | + ``` | ||
| 75 | + | ||
| 69 | 76 | ## <a name="getHunkByIndex"></a><span>Blame#</span>getHunkByIndex <span class="tags"><span class="sync">Sync</span><span class="experimental">Experimental</span></span> | |
| 70 | 77 | ||
| 71 | 78 | ```js | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -14,6 +14,7 @@ sections: | |||
| 14 | 14 | "lookupPrefix": "#lookupPrefix" | |
| 15 | 15 | "#content": "#content" | |
| 16 | 16 | "#filemode": "#filemode" | |
| 17 | + "#free": "#free" | ||
| 17 | 18 | "#id": "#id" | |
| 18 | 19 | "#isBinary": "#isBinary" | |
| 19 | 20 | "#owner": "#owner" | |
@@ -25,19 +26,18 @@ sections: | |||
| 25 | 26 | ## <a name="createFromBuffer"></a><span>Blob.</span>createFromBuffer <span class="tags"><span class="sync">Sync</span></span> | |
| 26 | 27 | ||
| 27 | 28 | ```js | |
| 28 | - var result = Blob.createFromBuffer(id, repo, buffer, len); | ||
| 29 | + var oid = Blob.createFromBuffer(repo, buffer, len); | ||
| 29 | 30 | ``` | |
| 30 | 31 | ||
| 31 | 32 | | Parameters | Type | | | |
| 32 | 33 | | --- | --- | --- | | |
| 33 | - | id | [Oid](/api/oid/) | return the id of the written blob | | ||
| 34 | 34 | | repo | [Repository](/api/repository/) | repository where to blob will be written | | |
| 35 | 35 | | buffer | Buffer | data to be written into the blob | | |
| 36 | 36 | | len | Number | length of the data | | |
| 37 | 37 | ||
| 38 | 38 | | Returns | | | |
| 39 | 39 | | --- | --- | | |
| 40 | - | Number | 0 or an error code | | ||
| 40 | + | [Oid](/api/oid/) | return the id of the written blob | | ||
| 41 | 41 | ||
| 42 | 42 | ## <a name="createFromDisk"></a><span>Blob.</span>createFromDisk <span class="tags"><span class="sync">Sync</span></span> | |
| 43 | 43 | ||
@@ -134,6 +134,12 @@ Retrieve the Blob's type. | |||
| 134 | 134 | | --- | --- | | |
| 135 | 135 | | Number | The filemode of the blob. | | |
| 136 | 136 | ||
| 137 | + ## <a name="free"></a><span>Blob#</span>free <span class="tags"><span class="sync">Sync</span></span> | ||
| 138 | + | ||
| 139 | + ```js | ||
| 140 | + blob.free(); | ||
| 141 | + ``` | ||
| 142 | + | ||
| 137 | 143 | ## <a name="id"></a><span>Blob#</span>id <span class="tags"><span class="sync">Sync</span></span> | |
| 138 | 144 | ||
| 139 | 145 | ```js | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -8,6 +8,7 @@ return_to: | |||
| 8 | 8 | "API Documentation Index": /api/ | |
| 9 | 9 | sections: | |
| 10 | 10 | "#containsNul": "#containsNul" | |
| 11 | + "#free": "#free" | ||
| 11 | 12 | "#grow": "#grow" | |
| 12 | 13 | "#isBinary": "#isBinary" | |
| 13 | 14 | "#set": "#set" | |
@@ -24,6 +25,12 @@ var result = buf.containsNul(); | |||
| 24 | 25 | | --- | --- | | |
| 25 | 26 | | Number | 1 if buffer contains a NUL byte | | |
| 26 | 27 | ||
| 28 | + ## <a name="free"></a><span>Buf#</span>free <span class="tags"><span class="sync">Sync</span><span class="experimental">Experimental</span></span> | ||
| 29 | + | ||
| 30 | + ```js | ||
| 31 | + buf.free(); | ||
| 32 | + ``` | ||
| 33 | + | ||
| 27 | 34 | ## <a name="grow"></a><span>Buf#</span>grow <span class="tags"><span class="async">Async</span><span class="experimental">Experimental</span></span> | |
| 28 | 35 | ||
| 29 | 36 | ```js | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -15,6 +15,7 @@ sections: | |||
| 15 | 15 | "#author": "#author" | |
| 16 | 16 | "#committer": "#committer" | |
| 17 | 17 | "#date": "#date" | |
| 18 | + "#free": "#free" | ||
| 18 | 19 | "#getEntry": "#getEntry" | |
| 19 | 20 | "#getParents": "#getParents" | |
| 20 | 21 | "#getTree": "#getTree" | |
@@ -172,6 +173,12 @@ Retrieve the commit time as a Date object. | |||
| 172 | 173 | | --- | --- | | |
| 173 | 174 | | Date | | | |
| 174 | 175 | ||
| 176 | + ## <a name="free"></a><span>Commit#</span>free <span class="tags"><span class="sync">Sync</span></span> | ||
| 177 | + | ||
| 178 | + ```js | ||
| 179 | + commit.free(); | ||
| 180 | + ``` | ||
| 181 | + | ||
| 175 | 182 | ## <a name="getEntry"></a><span>Commit#</span>getEntry <span class="tags"><span class="async">Async</span></span> | |
| 176 | 183 | ||
| 177 | 184 | ```js | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -10,6 +10,7 @@ sections: | |||
| 10 | 10 | "create": "#create" | |
| 11 | 11 | "createFromFile": "#createFromFile" | |
| 12 | 12 | "#compare": "#compare" | |
| 13 | + "#free": "#free" | ||
| 13 | 14 | "OPTION": "#OPTION" | |
| 14 | 15 | --- | |
| 15 | 16 | ||
@@ -60,6 +61,12 @@ var result = hashsig.compare(); | |||
| 60 | 61 | < | |
| 61 | 62 | 0 for error, [0 to 100] as similarity score | | |
| 62 | 63 | ||
| 64 | + ## <a name="free"></a><span>Hashsig#</span>free <span class="tags"><span class="sync">Sync</span><span class="experimental">Experimental</span></span> | ||
| 65 | + | ||
| 66 | + ```js | ||
| 67 | + hashsig.free(); | ||
| 68 | + ``` | ||
| 69 | + | ||
| 63 | 70 | ## <a name="OPTION"></a><span>Hashsig.</span>OPTION <span class="tags"><span class="enum">ENUM</span></span> | |
| 64 | 71 | ||
| 65 | 72 | | Flag | Value | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -10,6 +10,7 @@ sections: | |||
| 10 | 10 | "entryStage": "#entryStage" | |
| 11 | 11 | "open": "#open" | |
| 12 | 12 | "#add": "#add" | |
| 13 | + "#addAll": "#addAll" | ||
| 13 | 14 | "#addByPath": "#addByPath" | |
| 14 | 15 | "#caps": "#caps" | |
| 15 | 16 | "#clear": "#clear" | |
@@ -26,9 +27,11 @@ sections: | |||
| 26 | 27 | "#read": "#read" | |
| 27 | 28 | "#readTree": "#readTree" | |
| 28 | 29 | "#remove": "#remove" | |
| 30 | + "#removeAll": "#removeAll" | ||
| 29 | 31 | "#removeByPath": "#removeByPath" | |
| 30 | 32 | "#removeDirectory": "#removeDirectory" | |
| 31 | 33 | "#setCaps": "#setCaps" | |
| 34 | + "#updateAll": "#updateAll" | ||
| 32 | 35 | "#write": "#write" | |
| 33 | 36 | "#writeTree": "#writeTree" | |
| 34 | 37 | "#writeTreeTo": "#writeTreeTo" | |
@@ -80,6 +83,25 @@ var result = index.add(source_entry); | |||
| 80 | 83 | | --- | --- | | |
| 81 | 84 | | Number | 0 or an error code | | |
| 82 | 85 | ||
| 86 | + ## <a name="addAll"></a><span>Index#</span>addAll <span class="tags"><span class="async">Async</span></span> | ||
| 87 | + | ||
| 88 | + ```js | ||
| 89 | + index.addAll(pathspec, flags, callback, payload).then(function(result) { | ||
| 90 | + // Use result | ||
| 91 | + }); | ||
| 92 | + ``` | ||
| 93 | + | ||
| 94 | + | Parameters | Type | | ||
| 95 | + | --- | --- | --- | | ||
| 96 | + | pathspec | [Strarray](/api/strarray/) | array of path patterns | | ||
| 97 | + | flags | Number | combination of git_index_add_option_t flags | | ||
| 98 | + | callback | IndexMatchedPathCb | notification callback for each added/updated path (also gets index of matching pathspec entry); can be NULL; return 0 to add, >0 to skip, <0 to abort scan. | | ||
| 99 | + | payload | Void | payload passed through to callback function | | ||
| 100 | + | ||
| 101 | + | Returns | | | ||
| 102 | + | --- | --- | | ||
| 103 | + | Number | 0 on success, negative callback return value, or error code | | ||
| 104 | + | ||
| 83 | 105 | ## <a name="addByPath"></a><span>Index#</span>addByPath <span class="tags"><span class="sync">Sync</span></span> | |
| 84 | 106 | ||
| 85 | 107 | ```js | |
@@ -280,6 +302,24 @@ var result = index.remove(path, stage); | |||
| 280 | 302 | | --- | --- | | |
| 281 | 303 | | Number | 0 or an error code | | |
| 282 | 304 | ||
| 305 | + ## <a name="removeAll"></a><span>Index#</span>removeAll <span class="tags"><span class="async">Async</span></span> | ||
| 306 | + | ||
| 307 | + ```js | ||
| 308 | + index.removeAll(pathspec, callback, payload).then(function(result) { | ||
| 309 | + // Use result | ||
| 310 | + }); | ||
| 311 | + ``` | ||
| 312 | + | ||
| 313 | + | Parameters | Type | | ||
| 314 | + | --- | --- | --- | | ||
| 315 | + | pathspec | [Strarray](/api/strarray/) | array of path patterns | | ||
| 316 | + | callback | IndexMatchedPathCb | notification callback for each removed path (also gets index of matching pathspec entry); can be NULL; return 0 to add, >0 to skip, <0 to abort scan. | | ||
| 317 | + | payload | Void | payload passed through to callback function | | ||
| 318 | + | ||
| 319 | + | Returns | | | ||
| 320 | + | --- | --- | | ||
| 321 | + | Number | 0 on success, negative callback return value, or error code | | ||
| 322 | + | ||
| 283 | 323 | ## <a name="removeByPath"></a><span>Index#</span>removeByPath <span class="tags"><span class="sync">Sync</span></span> | |
| 284 | 324 | ||
| 285 | 325 | ```js | |
@@ -323,6 +363,24 @@ var result = index.setCaps(caps); | |||
| 323 | 363 | | --- | --- | | |
| 324 | 364 | | Number | 0 on success, -1 on failure | | |
| 325 | 365 | ||
| 366 | + ## <a name="updateAll"></a><span>Index#</span>updateAll <span class="tags"><span class="async">Async</span></span> | ||
| 367 | + | ||
| 368 | + ```js | ||
| 369 | + index.updateAll(pathspec, callback, payload).then(function(result) { | ||
| 370 | + // Use result | ||
| 371 | + }); | ||
| 372 | + ``` | ||
| 373 | + | ||
| 374 | + | Parameters | Type | | ||
| 375 | + | --- | --- | --- | | ||
| 376 | + | pathspec | [Strarray](/api/strarray/) | array of path patterns | | ||
| 377 | + | callback | IndexMatchedPathCb | notification callback for each updated path (also gets index of matching pathspec entry); can be NULL; return 0 to add, >0 to skip, <0 to abort scan. | | ||
| 378 | + | payload | Void | payload passed through to callback function | | ||
| 379 | + | ||
| 380 | + | Returns | | | ||
| 381 | + | --- | --- | | ||
| 382 | + | Number | 0 on success, negative callback return value, or error code | | ||
| 383 | + | ||
| 326 | 384 | ## <a name="write"></a><span>Index#</span>write <span class="tags"><span class="sync">Sync</span></span> | |
| 327 | 385 | ||
| 328 | 386 | ```js | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -10,6 +10,10 @@ sections: | |||
| 10 | 10 | "Instance Variables": "#ivars" | |
| 11 | 11 | --- | |
| 12 | 12 | ||
| 13 | + ```js | ||
| 14 | + var indexEntry = new IndexEntry(); | ||
| 15 | + ``` | ||
| 16 | + | ||
| 13 | 17 | ## <a name="ivars"></a>Instance Variables | |
| 14 | 18 | ||
| 15 | 19 | | Variable | Type | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -8,6 +8,7 @@ return_to: | |||
| 8 | 8 | "API Documentation Index": /api/ | |
| 9 | 9 | sections: | |
| 10 | 10 | "#commit": "#commit" | |
| 11 | + "#free": "#free" | ||
| 11 | 12 | "#hash": "#hash" | |
| 12 | 13 | --- | |
| 13 | 14 | ||
@@ -25,6 +26,12 @@ var result = indexer.commit(stats); | |||
| 25 | 26 | | --- | --- | | |
| 26 | 27 | | Number | | | |
| 27 | 28 | ||
| 29 | + ## <a name="free"></a><span>Indexer#</span>free <span class="tags"><span class="sync">Sync</span><span class="experimental">Experimental</span></span> | ||
| 30 | + | ||
| 31 | + ```js | ||
| 32 | + indexer.free(); | ||
| 33 | + ``` | ||
| 34 | + | ||
| 28 | 35 | ## <a name="hash"></a><span>Indexer#</span>hash <span class="tags"><span class="sync">Sync</span><span class="experimental">Experimental</span></span> | |
| 29 | 36 | ||
| 30 | 37 | ```js | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -15,6 +15,7 @@ sections: | |||
| 15 | 15 | "remove": "#remove" | |
| 16 | 16 | "#author": "#author" | |
| 17 | 17 | "#committer": "#committer" | |
| 18 | + "#free": "#free" | ||
| 18 | 19 | "#id": "#id" | |
| 19 | 20 | "#message": "#message" | |
| 20 | 21 | --- | |
@@ -147,6 +148,12 @@ var signature = note.committer(); | |||
| 147 | 148 | | --- | --- | | |
| 148 | 149 | | [Signature](/api/signature/) | the committer | | |
| 149 | 150 | ||
| 151 | + ## <a name="free"></a><span>Note#</span>free <span class="tags"><span class="sync">Sync</span><span class="experimental">Experimental</span></span> | ||
| 152 | + | ||
| 153 | + ```js | ||
| 154 | + note.free(); | ||
| 155 | + ``` | ||
| 156 | + | ||
| 150 | 157 | ## <a name="id"></a><span>Note#</span>id <span class="tags"><span class="sync">Sync</span><span class="experimental">Experimental</span></span> | |
| 151 | 158 | ||
| 152 | 159 | ```js | |
| Back | FazBrowse Home | New Git URL |
0 commit comments