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
This commit is contained in:
parent
1b9958f4fd
commit
e1fc9e204e
10 changed files with 129 additions and 97 deletions
14
doc/bugs/sync_-C_can_export_other_files.mdwn
Normal file
14
doc/bugs/sync_-C_can_export_other_files.mdwn
Normal file
|
@ -0,0 +1,14 @@
|
|||
When an exporttree=yes remote has had a tree exported to it, but eg with
|
||||
`git-annex export master --to foo --fast`, so not all the files have been
|
||||
sent to it yet, `git-annex sync -Cfoo` will also export files in other
|
||||
directories to it.
|
||||
|
||||
This seems like a bug, it ought to only export any files in the specified
|
||||
directory.
|
||||
|
||||
Another way this can happen is `git-annex sync -Cfoo`, when file bar
|
||||
has changed. Currently this exports bar to the export remote, but does
|
||||
not send it to any other remotes, since it's not in directory foo.
|
||||
|
||||
Also this affects `git-annex satisfy`, and other related commands too.
|
||||
--[[Joey]]
|
Loading…
Add table
Add a link
Reference in a new issue