mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-28 11:20:36 +00:00

Exclude the target directory from backups using CACHEDIR.TAG This patch follows the lead of #4386 (which excludes target directories from Time Machine backups) and is motived by the same reasons listen in #3884. CACHEDIR.TAG is an OS-independent mechanism supported by Borg, restic, GNU Tar and other backup/archiving solutions. See https://bford.info/cachedir/ for more information about the specification. This has been discussed in Rust Internals earlier this year[1] and it seems like it's an uncontroversial improvement so I went ahead with the patch. One thing I'm wondering is whether this should maybe cover the whole main target directory (right now it applies to `target/debug`, `target/release` etc. but not to target root). [1] https://internals.rust-lang.org/t/pre-rfc-put-cachedir-tag-into-target/12262/11