synchroniser : use prefer instead of force

When doing a forced synchronisation use the prefer directive instead of
force. This makes unison choose the remote version in case of conflicts
only and not for every change. This allows the add subcommand to be used
for adding a file to the sync (that is already present remotly) as well
as adding a brand new file from the local machine (after creating it or
downloading from somewhere for example).
This commit is contained in:
2026-01-30 17:06:55 +01:00
parent f2b676043c
commit 10a79554d3

View File

@@ -232,7 +232,7 @@ class Synchroniser:
command.append(f"BelowPath {path}")
if force:
command.append("-force")
command.append("-prefer")
command.append(remote_root)
command.append("-batch")