I think it would be useful if the assistant (when monitoring a repo) could automatically detect when the user adds a new remote to that repo. For example, right now, if I have two local repos (repo1
and repo2
) neither with any remotes and each is listed in ~/.config/git-annex/autostart
and I run git annex assistant --autostart
then the assistant will detect files added to each remote but won't sync between them (since they have no remotes) per design.
If I then add each repo as a remote of the other (from the command-line), assistant will still not sync files between the repos until I stop all the assistants running and then restart them. Presumably only on launch does the assistant check the list of remotes?
I think this is perhaps causing issues for users not just on the command-line but also for users who create multiple local remotes from the webapp and then combine them, since the webapp is perhaps not restarting the assistant daemons after the combine operation? I'm not sure about this…
The assistant watches for changes to the git-annex branch, and reloads its list of remotes within 60 seconds after a change.
If you're using
git remote add
, that doesn't affect the git-annex branch, so the assistant won't notice the new remote. Oncegit annex sync
with that remote, the git-annex branch will be updated and the assistant will notice it then.Could the assistant put a file watch on
.git/config
to detect when new remotes are added/removed?I am pretty sure this user assistant to have synced folders ran into this issue. They added two local remotes then hit the combine button, then looked for synced files. Assistant never started syncing, presumably for the reasons outlined in your comment. They did everything through the web gui so they really didn't have any expectation that they would need to manually restart all the assistant daemons after hitting the combine button.
Linking to another poster asking for assistant to monitor changes to
~/.git/config
https://git-annex.branchable.com/bugs/annex.autocommit_seems_ignored_for_new_files/