-
-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gitignore globs are read from enclosing directories, so tree is not copied #450
Comments
This comment was marked as outdated.
This comment was marked as outdated.
That's why I tried to just test the |
Ah actually this seems to be the problem:
You seem to have either A couple of workarounds for now:
I guess a proper fix would be that git ignore only follows parents up to the root of the git tree, so the gitignore implementation shouldn't look in your home either. I'm not sure if this is a bug in the Also, if we copy nothing maybe we should say so although it seems a bit of an edge case. |
Actually can I just confirm there is a |
Yes, I ran |
Hmm, this is interesting. I also use the I have that |
Yep, I know that pattern of ignoring This comes from cargo-mutants/src/copy_tree.rs Lines 54 to 63 in c8d09ab
Although, broader than this bug, you've helped me realize that people might be using the "ignored but added" pattern even inside their source tree, and so using it while copying would make an unusable copy. Maybe using gitignores isn't a good default. |
Oh, I see. It's the copying to a new location that caused the issue. I think maybe you should also copy |
Yes, the problem is to do with copying. If you use Can you say more about why to copy |
Just confirming that I can reproduce this with |
I haven't dug into the code, but I was thinking that the presence of a |
Also confirming I can reproduce this with a minimal repo created by I think the problem is that So this is basically BurntSushi/ripgrep#2812 (comment) |
Also, only read .gitignore from git directories. Release 24.11.2 Fixes #450
I'm trying to run
cargo-mutants
for my ubi crate (https://github.com/houseabsolute/ubi/) like this:This gives me the following output:
If I pass
--leak-dirs
, I note that the directory in/tmp
doesn't seem to exist. I tried settingTMPDIR=$HOME/tmp
and that led to the same error, which no temp directory being created.The text was updated successfully, but these errors were encountered: