added git-annex satisfy
authorJoey Hess <joeyh@joeyh.name>
Thu, 29 Jun 2023 19:34:53 +0000 (15:34 -0400)
committerJoey Hess <joeyh@joeyh.name>
Thu, 29 Jun 2023 19:34:53 +0000 (15:34 -0400)
commite1fc9e204efe11ac973fa1ed0e085de6a2003d5c
tree33d99fb9ae1e98397e48ac5c4d58accab43983b7
parent1b9958f4fd15f0f2f86aa495d999752d45bc0707
added git-annex satisfy

This ended up having an interface like sync, rather than like get/copy/drop.
That let it be implemented in terms of sync, which took a lot less code.
Also, it lets it handle many of the edge cases that sync does, such as
getting files that are not visible in a --hide-missing branch, and sending
files to exporttree remotes.

As well as being easier to implement, `git-annex satisfy myremote` makes
sense as it satisfies the preferred content settings of the remote.
`git-annex satisfy somefile` does not form a sentence that makes sense. So
while -C can be a little bit annoying, it still makes sense to have this
syntax.

Note that, while I initially thought this would also satisfy numcopies, it
does not. Arguably it ought to. But, sync does not send files in order to
satisfy numcopies, it only sends files to satisfy preferred content. And
it's important that this transfer the same files as sync does, because
it will probably be used in a workflow where the user sometimes syncs and
sometimes satisfies, and does not expect satisfy to do things that sync
would not do.

(Also opened a new bug that also affects sync et all, not only this command.)

Sponsored-by: Nicholas Golder-Manning on Patreon
CHANGELOG
CmdLine/GitAnnex.hs
Command/Satisfy.hs [new file with mode: 0644]
Command/Sync.hs
doc/bugs/sync_-C_can_export_other_files.mdwn [new file with mode: 0644]
doc/git-annex-pull.mdwn
doc/git-annex-satisfy.mdwn
doc/git-annex.mdwn
doc/todo/new_command_for_syncing_content_only.mdwn
git-annex.cabal