this.repository = repository;
}
@Override
IgnoreNode load() throws IOException {
IgnoreNode r;
if (entry != null) {
r = super.load();
if (r == null)
r = new IgnoreNode();
} else {
r = new IgnoreNode();
}
FS fs = repository.getFS();
String path = repository.getConfig().get(CoreConfig.KEY)
.getExcludesFile();
if (path != null) {
File excludesfile;
if (path.startsWith("~/"))
excludesfile = fs.resolve(fs.userHome(), path.substring(2));
else
excludesfile = fs.resolve(null, path);
loadRulesFromFile(r, excludesfile);
}
File exclude = fs
.resolve(repository.getDirectory(), "info/exclude");
loadRulesFromFile(r, exclude);
return r.getRules().isEmpty() ? null : r;
}