Apply.apply
var result = Apply.apply(repo, diff, location, options);
Parameters | Type | |
---|---|---|
repo | Repository | the repository to apply to |
diff | Diff | the diff to apply |
location | Number | the location to apply (workdir, index or both) |
options | ApplyOptions | the options for the apply (or null for defaults) |
Returns | |
---|---|
Number |
Apply.toTree
Apply.toTree(repo, preimage, diff, options).then(function(index) {
// Use index
});
Parameters | Type | |
---|---|---|
repo | Repository | the repository to apply |
preimage | Tree | the tree to apply the diff to |
diff | Diff | the diff to apply |
options | ApplyOptions | the options for the apply (or null for defaults) |
Returns | |
---|---|
Index | the postimage of the application |
Apply.LOCATION
Flag | Value |
---|---|
Apply.LOCATION.WORKDIR | 0 |
Apply.LOCATION.INDEX | 1 |
Apply.LOCATION.BOTH | 2 |