collect: add diff to credentials file; --diff overrides it

Change --diff from store_true to default=None so CLI presence is
distinguishable from the JSON default. If not given on CLI, reads
creds_data.get("diff", False). Updated install.sh template and README.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-26 15:09:54 +02:00
co-authored by Claude Sonnet 4.6
parent c33236020d
commit 5944b0a7a4
3 changed files with 8 additions and 3 deletions
+4 -1
View File
@@ -220,7 +220,8 @@ def main() -> None:
p.add_argument(
"--diff",
action="store_true",
help="Send diffs instead of full snapshots over the push server (default: off)",
default=None,
help="Send diffs instead of full snapshots over the push server (overrides credentials file, default: off)",
)
p.add_argument(
"--dry",
@@ -273,6 +274,8 @@ def main() -> None:
args.port = int(creds_data.get("port", 9999))
if args.log_dir is None:
args.log_dir = creds_data.get("log_dir", "./logs")
if args.diff is None:
args.diff = bool(creds_data.get("diff", False))
if not args.dry and (not args.username or not args.password):
p.error(