gabriel / muse public
fix main

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>

G Gabriel Cardona <cgcardona@gmail.com> · 4d ago Mar 20, 2026 · e05a2ecf · parent b105da0f
3
files changed
308
files in snapshot
Files Changed 308 in snapshot
~3
← Older Oldest on main
All commits
Newer → Latest on main

0 comments

No comments yet. Be the first to start the discussion.