I've experienced this error and took me some time to understand the cause.
$ undercover --compare origin/main
/home/user/.rbenv/versions/3.3.4/lib/ruby/gems/3.3.0/gems/undercover-0.6.4/lib/undercover/changeset.rb:27:in `each_patch': file changed before we could read it (Rugged::FilesystemError)
from /home/user/.rbenv/versions/3.3.4/lib/ruby/gems/3.3.0/gems/undercover-0.6.4/lib/undercover/changeset.rb:27:in `update'
from /home/user/.rbenv/versions/3.3.4/lib/ruby/gems/3.3.0/gems/undercover-0.6.4/lib/undercover.rb:35:in `initialize'
from /home/user/.rbenv/versions/3.3.4/lib/ruby/gems/3.3.0/gems/undercover-0.6.4/lib/undercover/cli.rb:25:in `new'
from /home/user/.rbenv/versions/3.3.4/lib/ruby/gems/3.3.0/gems/undercover-0.6.4/lib/undercover/cli.rb:25:in `run_report'
from /home/user/.rbenv/versions/3.3.4/lib/ruby/gems/3.3.0/gems/undercover-0.6.4/lib/undercover/cli.rb:21:in `run'
from /home/user/.rbenv/versions/3.3.4/lib/ruby/gems/3.3.0/gems/undercover-0.6.4/bin/undercover:12:in `block in <top (required)>'
from /home/user/.rbenv/versions/3.3.4/lib/ruby/gems/3.3.0/gems/benchmark-0.4.0/lib/benchmark.rb:323:in `realtime'
from /home/user/.rbenv/versions/3.3.4/lib/ruby/gems/3.3.0/gems/undercover-0.6.4/bin/undercover:11:in `<top (required)>'
from /home/user/.rbenv/versions/3.3.4/bin/undercover:25:in `load'
from /home/user/.rbenv/versions/3.3.4/bin/undercover:25:in `<main>'
Digging a little into the rugged code, found that it was due to untracked changes in the working git dir.
After staging (not even commiting) the changes the issue was solved.
Maybe the error should be wrapped into a more descriptive one?
I could take a stab a it, just let me know.
I've experienced this error and took me some time to understand the cause.
Digging a little into the rugged code, found that it was due to untracked changes in the working git dir.
After staging (not even commiting) the changes the issue was solved.
Maybe the error should be wrapped into a more descriptive one?
I could take a stab a it, just let me know.