| layout |
default |
| menu_item |
api |
| title |
Filter |
| description |
Version 0.13.1 |
| return_to |
| API Documentation Index |
/api/ |
|
| sections |
| listContains |
listNew |
listStreamBlob |
listStreamData |
listStreamFile |
unregister |
#lookup |
#register |
FLAG |
MODE |
Instance Variables |
#listContains |
#listNew |
#listStreamBlob |
#listStreamData |
#listStreamFile |
#unregister |
#lookup |
#register |
#FLAG |
#MODE |
#ivars |
|
Filter.listContains SyncExperimental
var result = Filter.listContains(filters, name);
| Parameters |
Type |
|
| filters |
FilterList |
A loaded git_filter_list (or NULL) |
| name |
String |
The name of the filter to query |
| Returns |
|
| Number |
1 if the filter is in the list, 0 otherwise |
Filter.listNew AsyncExperimental
Filter.listNew(repo, mode, options).then(function(filterList) {
// Use filterList
});
| Parameters |
Type |
|
| repo |
Repository |
|
| mode |
Number |
|
| options |
Number |
|
Filter.listStreamBlob SyncExperimental
var result = Filter.listStreamBlob(filters, blob, target);
| Parameters |
Type |
|
| filters |
FilterList |
the list of filters to apply |
| blob |
Blob |
the blob to filter |
| target |
Writestream |
the stream into which the data will be written |
Filter.listStreamData SyncExperimental
var result = Filter.listStreamData(filters, data, target);
| Parameters |
Type |
|
| filters |
FilterList |
the list of filters to apply |
| data |
Buf |
the buffer to filter |
| target |
Writestream |
the stream into which the data will be written |
Filter.listStreamFile SyncExperimental
var result = Filter.listStreamFile(filters, repo, path, target);
| Parameters |
Type |
|
| filters |
FilterList |
the list of filters to apply |
| repo |
Repository |
the repository in which to perform the filtering |
| path |
String |
the path of the file to filter, a relative path will be taken as relative to the workdir |
| target |
Writestream |
the stream into which the data will be written |
Filter.unregister SyncExperimental
var result = Filter.unregister(name);
| Parameters |
Type |
|
| name |
String |
The name under which the filter was registered |
| Returns |
|
| Number |
0 on success, error code |
| < |
|
| 0 on failure |
|
Filter#lookup SyncExperimental
var filter = filter.lookup(name);
| Parameters | Type |
| --- | --- | --- |
| name | String | The name of the filter |
Filter#register SyncExperimental
var result = filter.register(name, priority);
| Parameters | Type |
| --- | --- | --- |
| name | String | A name by which the filter can be referenced. Attempting to register with an in-use name will return GIT_EEXISTS. |
| priority | Number | The priority for filter application |
| Returns |
|
| Number |
0 on successful registry, error code |
| < |
|
| 0 on failure |
|
| Flag | Value |
| --- | --- | --- |
| Filter.FLAG.DEFAULT | 0 |
| Filter.FLAG.ALLOW_UNSAFE | 1 |
| Flag | Value |
| --- | --- | --- |
| Filter.MODE.TO_WORKTREE | 0 |
| Filter.MODE.SMUDGE | 0 |
| Filter.MODE.TO_ODB | 1 |
| Filter.MODE.CLEAN | 1 |
| Variable |
Type |
| attributes |
String |
| stream |
FilterStreamFn |
| version |
Number |