Open
Description
Problem
cargo vendor
creates a bunch of files with paths from other people's crates. people sometimes write poorly specified .gitignore files that are too broad and don't anchor specific directories; this is silly but people do silly things, see for example rust-lang/rust#138978. in this case git add vendor/
doesn't do what they expect, some of the paths are ignored.
Proposed Solution
add !/vendor
to the default gitignore.
Notes
i took a look at the code for this. currently the logic lives here:
cargo/src/cargo/ops/cargo_new.rs
Lines 747 to 750 in 6344cad
it's not as simple as adding another
.push
line, because Fossil requires these to be configured in a separate ignore-glob
file and Mercurial doesn't support this kind of thing at all. Not sure if this has interactions with pijul.
the current design makes it hard to handle two different files for include and exclude, so that would need to be refactored somehow.