MCPcopy
hub / github.com/antfu/skills / getExistingSubmodulePaths

Function getExistingSubmodulePaths

scripts/cli.ts:39–46  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

37const RE_SUBMODULE_PATH = /path\s*=\s*(.+)/g
38
39function getExistingSubmodulePaths(): string[] {
40 const gitmodules = join(root, '.gitmodules')
41 if (!existsSync(gitmodules))
42 return []
43 const content = readFileSync(gitmodules, 'utf-8')
44 const matches = content.matchAll(RE_SUBMODULE_PATH)
45 return Array.from(matches, match => match[1].trim())
46}
47
48function removeSubmodule(submodulePath: string): void {
49 // Deinitialize the submodule

Callers 2

initSubmodulesFunction · 0.85
cleanupFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected