The shell snippet (between markers) injected into each hook.
(root: string)
| 122 | |
| 123 | /** The shell snippet (between markers) injected into each hook. */ |
| 124 | function markerBlock(root: string): string { |
| 125 | return [ |
| 126 | MARKER_BEGIN, |
| 127 | '# Keeps the CodeGraph index fresh while the live file watcher is off', |
| 128 | '# (e.g. WSL2 /mnt drives). Runs in the background so it never blocks git.', |
| 129 | '# Managed by codegraph; remove with `codegraph uninit` or delete this block.', |
| 130 | `${ROOT_PREFIX}${root}`, |
| 131 | 'if command -v codegraph >/dev/null 2>&1; then', |
| 132 | ` ( codegraph sync ${shellQuote(root)} >/dev/null 2>&1 & ) >/dev/null 2>&1`, |
| 133 | 'fi', |
| 134 | MARKER_END, |
| 135 | ].join('\n'); |
| 136 | } |
| 137 | |
| 138 | type BlockOwner = (blockRoot: string | null) => boolean; |
| 139 |
no test coverage detected