Closed
Description
Currently PathSource::list_files
looks for packages where Repository::open
will succeed, but this will never succeed if there is never a package at the root of a git repository. This means that filters such as pruning everything in .gitignore
from the file listings will not work because no git repository is detected.
To replicate this behavior:
- Create a git repository and change directories into it
cargo new a
cargo new b
- Edit
b
to depend ona
(as a path dependency) - Edit
a
to have a build script which creates the filea/foo
in the git repository - Add
a/foo
to the repo's.gitignore
On re-running cargo build
in the directory for b
it will spuriously rebuild a
too frequently as it doesn't know that it should ignore a/foo
.