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

Function lsFilesStaged

src/extraction/index.ts:1348–1354  ·  view source on GitHub ↗

* `git ls-files -z -s -t`, expanding submodules where git allows it. * * `--recurse-submodules` could not be combined with `-s` before git 2.36: * `builtin/ls-files.c` listed `show_stage` among the modes that die, and the * check is unconditional — it does not look at whether the repo actually h

(gitOpts: Parameters<typeof execFileSync>[2])

Source from the content-addressed store, hash-verified

1346 * bits, and embedded repos are reached through the gitlink recursion anyway.
1347 */
1348function lsFilesStaged(gitOpts: Parameters<typeof execFileSync>[2]): string {
1349 try {
1350 return execFileSync('git', ['ls-files', '-z', '-s', '-t', '--recurse-submodules'], gitOpts) as unknown as string;
1351 } catch {
1352 return execFileSync('git', ['ls-files', '-z', '-s', '-t'], gitOpts) as unknown as string;
1353 }
1354}
1355
1356/** Whether an {@link lsFilesStaged} entry, `<tag> <mode> <object> <stage>\t<path>`, is a gitlink. */
1357function isGitlinkEntry(entry: string): boolean {

Callers 2

visitFunction · 0.85
collectGitFilesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected