rustic-rs / rustic

rustic - fast, encrypted, and deduplicated backups powered by Rust
https://rustic.cli.rs
Apache License 2.0
1.97k stars 71 forks source link

Should not look for `.git` or `.git/info/exclude` if `git-ignore = false` #1261

Open tfar opened 1 month ago

tfar commented 1 month ago

I have set git-ignore = false in my config. Yet strace shows tons of the following commands when running a backup:

[pid 2301286] stat("/1/5/e/e/0/.git", 0x7f49ced334a0) = -1 ENOENT (No such file or directory)
[pid 2301286] stat("/1/5/e/e/0/.git/info/exclude", 0x7f49ced331c0) = -1 ENOENT (No such file or directory)
simonsan commented 1 month ago

https://github.com/rustic-rs/rustic_core/blob/main/crates/core/src/backend/ignore.rs#L208-L209

I looked into this, and it seems to be either an upstream issue or intended behaviour, to determine if a subfolder is a git repo.