diff options
author | Joey Hess <joey@kitenet.net> | 2014-01-02 13:12:32 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-01-02 13:12:32 -0400 |
commit | 434a8098037574ddd83e09bbf82a9d5b27181b8e (patch) | |
tree | 978ab0f48be492e06939e168cbc2392c4ae91b92 /Command/Sync.hs | |
parent | 94043b612888a0555f630669c6391cb75842b6ea (diff) |
Remotes can now be made read-only, by setting remote.<name>.annex-readonly
Diffstat (limited to 'Command/Sync.hs')
-rw-r--r-- | Command/Sync.hs | 4 |
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) |