summaryrefslogtreecommitdiff
path: root/Command/Sync.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Command/Sync.hs')
-rw-r--r--Command/Sync.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/Command/Sync.hs b/Command/Sync.hs
index 14c79e99d..38a6a5c6a 100644
--- a/Command/Sync.hs
+++ b/Command/Sync.hs
@@ -203,7 +203,9 @@ pushRemote :: Remote -> Maybe Git.Ref -> CommandStart
pushRemote _remote Nothing = stop
pushRemote remote (Just branch) = go =<< needpush
where
- needpush = anyM (newer remote) [syncBranch branch, Annex.Branch.name]
+ needpush
+ | remoteAnnexReadOnly (Types.Remote.gitconfig remote) = return False
+ | otherwise = anyM (newer remote) [syncBranch branch, Annex.Branch.name]
go False = stop
go True = do
showStart "push" (Remote.name remote)