I find that it's possible for a repo to not get the content that it wants to have. It happens if the repo only points to remotes that don't have the content.
git annex get
will fail:
$ git annex get --want-get
get foo (not available)
Maybe add some of these git remotes (git remote add ...):
6ac12bd5-b585-4884-b0fe-a48fdc1b6365 -- b
failed
get: 1 failed
But git annex sync --content
passes, despite not getting any of the wanted content.
Is there a way to make git annex sync --content
error if it can't fetch wanted content, the way git annex get
does?
I guess I can
git annex sync --content && git annex get --auto
to make sure I get the content I want. Although at that point, it's probably better to dogit annex sync && git annex get --auto && git annex drop --auto
. I was expectingsync
to handle the auto get/drop - which it usually does. But it silently passes even when it doesn't get the wanted content.Perhaps I should think of
sync
as a "best effort" mode? That is, it will download available content, but I shouldn't rely on it to download all wanted content -get
is the job for that.The rationelle for this difference is that with
git-annex get
you are explicitly asking it to get the specified files (or all files), while withgit-annex sync --content
you are asking it to make the local and remote be in sync with respect to whether they contain the content or not. When neither local nor remote contains the content, they are still in sync..