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

Function markerBlock

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

The shell snippet (between markers) injected into each hook.

()

Source from the content-addressed store, hash-verified

75
76/** The shell snippet (between markers) injected into each hook. */
77function markerBlock(): string {
78 return [
79 MARKER_BEGIN,
80 '# Keeps the CodeGraph index fresh while the live file watcher is off',
81 '# (e.g. WSL2 /mnt drives). Runs in the background so it never blocks git.',
82 '# Managed by codegraph; remove with `codegraph uninit` or delete this block.',
83 'if command -v codegraph >/dev/null 2>&1; then',
84 ' ( codegraph sync >/dev/null 2>&1 & ) >/dev/null 2>&1',
85 'fi',
86 MARKER_END,
87 ].join('\n');
88}
89
90/** Remove our marker block (and the marker lines) from hook content. */
91function stripMarkerBlock(content: string): string {

Callers 1

installGitSyncHookFunction · 0.85

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected