MCPcopy
hub / github.com/di-sukharev/opencommit / _addPattern

Method _addPattern

out/cli.cjs:64485–64496  ·  view source on GitHub ↗
(pattern)

Source from the content-addressed store, hash-verified

64483 this._ignoreCase = ignoreCase;
64484 this._allowRelativePaths = allowRelativePaths;
64485 this._initCache();
64486 }
64487 _initCache() {
64488 this._ignoreCache = /* @__PURE__ */ Object.create(null);
64489 this._testCache = /* @__PURE__ */ Object.create(null);
64490 }
64491 _addPattern(pattern) {
64492 if (pattern && pattern[KEY_IGNORE]) {
64493 this._rules = this._rules.concat(pattern._rules);
64494 this._added = true;
64495 return;
64496 }
64497 if (checkPattern(pattern)) {
64498 const rule = createRule(pattern, this._ignoreCase);
64499 this._added = true;

Callers

nothing calls this directly

Calls 4

checkPatternFunction · 0.85
createRuleFunction · 0.85
concatMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected