fix: directory ignore patterns and git2muse lstrip stripping dots (#152)
Two bugs that caused ghost files in `muse status` after a git2muse replay:
1. tools/git2muse.py: lstrip('./') treated its argument as a character set, stripping the leading dot from hidden paths (.cursorignore → cursorignore, .github/ → github/). _should_exclude never matched them, so they landed in every Muse snapshot without dots. Fixed with removeprefix('./') which only removes the literal tar prefix.
2. muse/core/ignore.py: directory patterns (trailing /) were silently skipped instead of matching all files inside that directory. Fixed to match gitignore semantics: 'artifacts/' now ignores every file under artifacts/. Updated two tests that documented the old broken behaviour.
Co-authored-by: Gabriel Cardona <gabriel@tellurstori.com>
No comments yet. Be the first to start the discussion.