Skip to content

Latest commit

 

History

History
58 lines (45 loc) · 1.61 KB

File metadata and controls

58 lines (45 loc) · 1.61 KB
layout default
menu_item api
title Ignore
description Version 0.11.0
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 Sync

var result = Ignore.pathIsIgnored(repo, path);
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