Commit a9cd175
authored
fix(db): stop findDbPath walk at cwd when no git ceiling (#1193)
When findRepoRoot() returns null, the walk used to climb to /, which
could silently attach to a stale .codegraph/ in an unrelated parent —
e.g. /private/tmp/.codegraph/ leaking into every /tmp/foo/ run, or
$HOME/.codegraph/ leaking into every scratch dir under $HOME (the
"Phase 0 footgun" from the v3.10.1-dev.80 dogfood report, §10.6).
Outside a git repo, cwd is now the first (and only) directory we'll
check. Users running codegraph in non-git project subdirectories
must either cd to the project root, git init, or pass -d/--db.1 parent af0fb4d commit a9cd175
2 files changed
Lines changed: 35 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
292 | 292 | | |
293 | 293 | | |
294 | 294 | | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
295 | 303 | | |
296 | 304 | | |
297 | 305 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
350 | 350 | | |
351 | 351 | | |
352 | 352 | | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
353 | 380 | | |
354 | 381 | | |
355 | 382 | | |
| |||
0 commit comments