currently i am running into an issue when trying to export to my android device using the adb special remote, basically git annex won't export files to it after listing and importing them because it does not think the tracking branch is set, even though it is (ga is an alias i have for "git annex")
git remote
moto
motoE5
seagate2tb
seagate5tb
shouseServer
ga sync --content moto
commit
On branch master
Your branch is ahead of 'seagate5tb/master' by 12 commits.
(use "git push" to publish your local commits)
nothing added to commit but untracked files present (use "git add" to track)
ok
list moto ok
update refs/remotes/moto/master ok
Not updating export to moto to reflect changes to the tree, because export tracking is not enabled. (Set remote.moto.annex-tracking-branch to enable it.)
but when i run
git config remote.moto.annex-tracking-branch
i get a result because i have it set
master:devices/motoE5
this seems to be a bug, but i wanted to make sure i wasn't doing something wrong before submitting a bug report.
I think I see how this could happen. seekExportContent checks if remoteAnnexTrackingBranch is set. If it is, it tries to list the tree for that branch, and also gets the export commit for that branch. If either of those actions fail, it displays the message you saw, the same as if remoteAnnexTrackingBranch had not been set.
Hmm, I think the most likely reason is that master:devices/motoE5 does not exist yet, so it fails to list the tree for it.
If so, doing a single time
git-annex import --from moto master:devices/motoE5
would probably make sync work.At least the message needs to be improved. It may also be that something needs to be done to prevent needing to run git-annex import before sync will work, or the documentation better document that you need to do it, or the message suggest doing it when this happens.
I do notice that in the git-annex-import man page, the example does a single time
git-annex import
of the branch before setting the git config and using sync.I've promoted this thread to a bug report.
Aha! I was able to reproduce it by following android sync with adb, but only configure the remote with exporttree=yes, while leaving off the importtree=yes.
Alternatively -- and I think this is probably what you did -- do include importtree=yes, but the special remote is actually empty, it does not include any files to import yet. And the directory you have configured to export does not exist in your repository.
In both these cases, the export fails because it is unable to determine what to export to the remote, because the current branch does not contain the subdirectory that it's configured to export.
I have fixed the warning message in this case, and the thing to do is just to create the subdirectory you configured it to export, and git add files to it. Or, in your case, you could put a file on the android device, which it would then import, and so get the subdirectory populated that way.