Ignore.addRule
var result = Ignore.addRule(repo, rules);
Parameters | Type | |
---|---|---|
repo | Repository | The repository to add ignore rules to. |
rules | String | Text of rules, a la the contents of a .gitignore file. It is okay to have multiple rules in the text; if so, each rule should be terminated with a newline. |
Returns | |
---|---|
Number | 0 on success |
Ignore.clearInternalRules
var result = Ignore.clearInternalRules(repo);
Parameters | Type | |
---|---|---|
repo | Repository | The repository to remove ignore rules from. |
Returns | |
---|---|
Number | 0 on success |
Ignore.pathIsIgnored
Ignore.pathIsIgnored(repo, path).then(function(result) {
// Use result
});
Parameters | Type | |
---|---|---|
repo | Repository | a repository object |
path | String | the file to check ignores for, relative to the repo’s workdir. |
Returns | |
---|---|
Number | boolean returning 0 if the file is not ignored, 1 if it is |