MCPcopy Create free account
hub / github.com/Silentely/eSIM-Tools / getTouchedProtectedFiles

Function getTouchedProtectedFiles

scripts/pre-commit-check.js:63–73  ·  view source on GitHub ↗

* Get the list of protected file paths that currently have staged changes. * @returns {string[]} Array of relative paths for protected files that are staged; empty if none.

()

Source from the content-addressed store, hash-verified

61 * @returns {string[]} Array of relative paths for protected files that are staged; empty if none.
62 */
63function getTouchedProtectedFiles() {
64 const output = git([
65 'diff',
66 '--cached',
67 '--name-only',
68 '-z',
69 '--',
70 ...PROTECTED_FILES
71 ]);
72 return output.split('\0').filter(Boolean);
73}
74
75/**
76 * Determine whether a file should be normalized (text formatting enforced) based on its path.

Callers 1

mainFunction · 0.70

Calls 1

gitFunction · 0.85

Tested by

no test coverage detected