MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / isEffectivelyEmpty

Function isEffectivelyEmpty

src/sync/git-hooks.ts:208–213  ·  view source on GitHub ↗

Whether a hook body is just a shebang / blank lines (i.e. only ever ours).

(content: string)

Source from the content-addressed store, hash-verified

206
207/** Whether a hook body is just a shebang / blank lines (i.e. only ever ours). */
208function isEffectivelyEmpty(content: string): boolean {
209 return content
210 .split('\n')
211 .map((l) => l.trim())
212 .every((l) => l.length === 0 || l.startsWith('#!'));
213}
214
215function chmodExecutable(file: string): void {
216 try {

Callers 2

installGitSyncHookFunction · 0.85
removeGitSyncHookFunction · 0.85

Calls 1

mapMethod · 0.80

Tested by

no test coverage detected