ziglang / zig

General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.
https://ziglang.org
MIT License
33.79k stars 2.47k forks source link

Feature: Add CACHEDIR.TAG to zig-cache #8210

Open Ciantic opened 3 years ago

Ciantic commented 3 years ago

Consider adding CACHEDIR.TAG to zig-cache directory.

It's just text file with ASCII text at the beginning:

Signature: 8a477f597d28d172789f06886806bc55

(The hexadecimal string is same on all CACHEDIR.TAG files.)

For example Rust does this, and plenty other things, it makes easier for backup tools to ignore the directory.

daurnimator commented 3 years ago

Do you have examples of tools that use CACHEDIR.TAG? this is the first I've heard of it.

g-w1 commented 3 years ago

Cargo uses it. image

mikdusan commented 3 years ago

Do you have examples of tools that use CACHEDIR.TAG? this is the first I've heard of it.

from gnutar docs:

       --exclude-caches
              exclude contents of directories containing CACHEDIR.TAG, except for the tag file itself

       --exclude-caches-all
              exclude directories containing CACHEDIR.TAG

       --exclude-caches-under exclude everything under directories containing
              CACHEDIR.TAG
Ciantic commented 3 years ago

Kopia (my preferred backup tool at the moment) uses it by default

perillo commented 1 year ago

Do you have examples of tools that use CACHEDIR.TAG? this is the first I've heard of it.

Restic and fontconfig supports it. I also opened an issue for rsync.

perillo commented 1 year ago

What about adding CACHEDIR.TAG to the zig-out directory, too?