mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-24 14:16:34 +09:00
`ruflo doctor` was reporting `Not a git repository` even when `.git/`
clearly existed in cwd, because the only signal it consulted was a `git
rev-parse --git-dir` invocation that failed for unrelated environment
reasons (PATH inheritance, daemon-launched contexts, broken global git
config, etc.).
Two changes:
1. Use `--is-inside-work-tree` instead of `--git-dir` — slightly more
robust and matches what other tools do.
2. On failure, walk up parents of cwd looking for a `.git` directory.
If found, surface a *useful* warning ("repo detected on disk but
`git rev-parse` failed — check git PATH") instead of the misleading
"not a repository". Only return the original message when neither
git nor a .git directory is found.
This preserves `pass` semantics (still requires git working) but stops
gaslighting users whose repos are clearly on disk.
Closes #1791 (sub-bug 7).