Skip to content

Latest commit

 

History

History
60 lines (47 loc) · 1.64 KB

File metadata and controls

60 lines (47 loc) · 1.64 KB
layout default
menu_item api
title Ignore
description Version 0.26.1
return_to
API Documentation Index
/api/
sections
addRule clearInternalRules pathIsIgnored
#addRule
#clearInternalRules
#pathIsIgnored

Ignore.addRule Sync

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 Sync

var result = Ignore.clearInternalRules(repo);
Parameters Type
repo Repository The repository to remove ignore rules from.
Returns
Number 0 on success

Ignore.pathIsIgnored Async

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