GitNexus/gitnexus/src
azizur100389 4048f53e35
fix(git): suppress stderr leak in getCurrentCommit and getGitRoot (#1172) (#1341)
* fix(git): suppress stderr leak in getCurrentCommit and getGitRoot (#1172)

Node's execSync forwards the child's stderr to the parent process when
the stdio option is not explicitly set. getCurrentCommit and getGitRoot
both caught the resulting error but did not suppress the stderr output,
causing "fatal: not a git repository" messages to leak to the terminal
whenever they were called on a path outside a git worktree.

Add stdio: ['ignore', 'pipe', 'ignore'] to both functions, matching the
pattern already used by getRemoteUrl, getRemoteOriginUrl, and
getCanonicalRepoRoot in the same file.

* address review: add getGitRoot stderr test, normalize em dashes to ASCII

- Add matching process.stderr.write spy test for getGitRoot (#1172)
- Replace U+2014 em dashes with ASCII -- in new comments
2026-05-05 14:29:42 +01:00
..
cli fix(setup): prefer .cmd/.bat wrapper from Windows where output (#1299) 2026-05-04 08:25:38 +01:00
config feat(ingestion): GITNEXUS_INDEX_TEST_DIRS opt-in for __tests__ / __mocks__ (#771) (#1046) 2026-04-23 13:49:06 +01:00
core fix(embeddings): add CHECKPOINT before closing database to prevent WAL corruption (#1314) 2026-05-05 13:35:22 +01:00
lib feat: configure prettier with pre-commit hook (#563) 2026-03-28 14:58:04 +00:00
mcp feat(mcp): add tool safety annotations (#1127) 2026-05-03 09:06:41 +01:00
server fix(server): rate-limit /api/analyze and /api/embed endpoints (#1328) (#1339) 2026-05-04 23:03:05 +01:00
storage fix(git): suppress stderr leak in getCurrentCommit and getGitRoot (#1172) (#1341) 2026-05-05 14:29:42 +01:00
types feat(ingestion): language-agnostic heritage extractor with config+factory pattern (#890) 2026-04-17 17:51:17 +01:00