sync: Warn when a remote's export is not updated to the current tree because export tracking is not configured.

Only display the warning when the current branch has a tree that is not
the same as the tree in the export.

Note that it doesn't check to see if the current tree is
in incompleteExportedTreeish; it might be worth checking that and reminding
the user about an incomplete export, but when export tracking is not
configured, they are probably not in the right clone of the repository to
resolve the incomplete export.

This commit was sponsored by Ethan Aubin.
This commit is contained in:
Joey Hess 2018-09-27 15:35:46 -04:00
parent f35ba87ea6
commit 9adee3f2fb
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
5 changed files with 38 additions and 7 deletions

View file

@ -64,6 +64,7 @@ exportToRemotes rs = do
Annex.changeState $ \st -> st { Annex.errcounter = 0 }
start <- liftIO getCurrentTime
void $ Command.Sync.seekExportContent rs
=<< join Command.Sync.getCurrBranch
-- Look at command error counter to see if the export
-- didn't work.
failed <- (> 0) <$> Annex.getState Annex.errcounter