summaryrefslogtreecommitdiff
path: root/Command/Sync.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-08-22 14:51:11 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-08-22 15:05:57 -0400
commit5c3e14649ee7c404f86a1b82b648d896762cbbc2 (patch)
tree832bbe820a62a9fec50a5a179c114c9a8767006c /Command/Sync.hs
parent5d577c32a946a070c70ddba192f3d8cf4229b7fa (diff)
avoid unnecessary transfer scans when syncing a disconnected remote
Found a very cheap way to determine when a disconnected remote has diverged, and has new content that needs to be transferred: Piggyback on the git-annex branch update, which already checks for divergence. However, this does not check if new content has appeared locally while disconnected, that should be transferred to the remote. Also, this does not handle cases where the two git repos are in sync, but their content syncing has not caught up yet. This code could have its efficiency improved: * When multiple remotes are synced, if any one has diverged, they're all queued for transfer scans. * The transfer scanner could be told whether the remote has new content, the local repo has new content, or both, and could optimise its scan accordingly.
Diffstat (limited to 'Command/Sync.hs')
-rw-r--r--Command/Sync.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Command/Sync.hs b/Command/Sync.hs
index f40a2f621..023b1b84a 100644
--- a/Command/Sync.hs
+++ b/Command/Sync.hs
@@ -172,7 +172,7 @@ pushBranch remote branch g =
mergeAnnex :: CommandStart
mergeAnnex = do
- Annex.Branch.forceUpdate
+ void $ Annex.Branch.forceUpdate
stop
mergeFrom :: Git.Ref -> Annex Bool