borgbackup/scripts
Thomas Waldmann f484741fdd
create: add --exclude-dataless to skip cloud files not materialized locally
Ports #9755 (1.4-maint) to master.

macOS flags files whose content lives in cloud storage (e.g. iCloud Drive)
and is not present locally with SF_DATALESS. Reading such a file triggers
downloading its content.

This adds --exclude-dataless to borg create: the flags are checked right
after stat() and before any open(), so excluded files/dirs never get
materialized. Skipped paths are reported with the usual 'x' status,
analogous to --exclude-nodump.

Notes:
- stat.SF_DATALESS only exists from Python 3.13 on, so there is a fallback
  to the value from macOS' sys/stat.h (0x40000000).
- The check covers directories too (they can also be dataless), and we skip
  before opening/recursing into them.
- Test fakes get_flags via monkeypatch since SF_DATALESS cannot be set from
  userspace.
- Fish shell completion updated; bash/zsh completions don't exist in master.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-11 07:36:53 +02:00
..
make-testdata fixed typos and grammar (AI) 2025-09-23 14:56:23 +02:00
shell_completions/fish create: add --exclude-dataless to skip cloud files not materialized locally 2026-06-11 07:36:53 +02:00
borg.exe.spec pyinstaller binary: do not exclude ssl, needed for pyfuse3/trio, fixes #9196 2026-02-14 19:32:38 +01:00
build-borg-using-nuitka.sh binary build scripts: use /bin/sh 2026-06-07 15:32:19 +02:00
build-borg-using-pyinstaller.sh binary build scripts: use /bin/sh 2026-06-07 15:32:19 +02:00
Dockerfile.linux-run use xxhash from PyPI, fixes #6535 2026-03-08 13:06:01 +01:00
errorlist.py fixed typos and grammar (AI) 2025-09-23 14:56:23 +02:00
fetch-binaries build binaries on github 2025-10-16 00:37:46 +02:00
glibc_check.py fixed typos and grammar (AI) 2025-09-23 14:56:23 +02:00
linux-run rename Dockerfile to match script name 2026-02-14 19:32:32 +01:00
make.py remove the superfluous borg.checksums module 2026-05-12 18:41:34 +02:00
msys2-install-deps remove xxhash / xxh64 requirement, mentions 2026-06-10 00:38:18 +02:00
sdist-sign use less setup.py, use pip and build 2024-01-02 19:50:59 +01:00
sign-binaries fix shellcheck warnings in bash scripts 2022-07-22 15:52:04 +00:00
upload-pypi upload-pypi: use borg-specific repository names 2025-11-01 19:57:26 +01:00