MCPcopy Create free account
hub / github.com/SethGammon/Citadel / listUntrackedPath

Function listUntrackedPath

core/verification/profiles.js:40–59  ·  view source on GitHub ↗
(projectRoot, statusPath)

Source from the content-addressed store, hash-verified

38}
39
40function listUntrackedPath(projectRoot, statusPath) {
41 const fullPath = path.join(projectRoot, statusPath);
42 try {
43 const stat = fs.statSync(fullPath);
44 if (!stat.isDirectory()) return [statusPath];
45 const found = [];
46 const walk = (dir) => {
47 for (const entry of fs.readdirSync(dir)) {
48 const entryPath = path.join(dir, entry);
49 const entryStat = fs.statSync(entryPath);
50 if (entryStat.isDirectory()) walk(entryPath);
51 else found.push(normalizePath(path.relative(projectRoot, entryPath)));
52 }
53 };
54 walk(fullPath);
55 return found;
56 } catch {
57 return [statusPath];
58 }
59}
60
61function changedFilesFromGit(projectRoot) {
62 const dirty = [

Callers 1

changedFilesFromGitFunction · 0.85

Calls 1

walkFunction · 0.70

Tested by

no test coverage detected