-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Open
Labels
A-vcsArea: general VCS issuesArea: general VCS issuesC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Command-initCommand-newCommand-vendorS-triageStatus: This issue is waiting on initial triage.Status: This issue is waiting on initial triage.
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
// Using the push method with multiple arguments ensures that the entries | |
// for all mutually-incompatible VCS in terms of syntax are in sync. | |
let mut ignore = IgnoreList::new(); | |
ignore.push("/target", "^target$", "target"); |
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.
Metadata
Metadata
Assignees
Labels
A-vcsArea: general VCS issuesArea: general VCS issuesC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Command-initCommand-newCommand-vendorS-triageStatus: This issue is waiting on initial triage.Status: This issue is waiting on initial triage.