empty preferred content
* Document that settting preferred content to "" is the same as the default unset behavior. * sync: Avoid misleading warning about future preferred content transition when preferred content is set to "".
This commit is contained in:
parent
57d276cabf
commit
7d8558548b
4 changed files with 35 additions and 1 deletions
|
@ -85,6 +85,7 @@ import Utility.Bloom
|
|||
import Utility.OptParse
|
||||
import Utility.Process.Transcript
|
||||
import Utility.Tuple
|
||||
import Utility.Matcher
|
||||
|
||||
import Control.Concurrent.MVar
|
||||
import qualified Data.Map as M
|
||||
|
@ -1130,7 +1131,7 @@ warnSyncContentTransition o remotes
|
|||
_ -> do
|
||||
m <- preferredContentMap
|
||||
hereu <- getUUID
|
||||
when (any (`M.member` m) (hereu:map Remote.uuid remotes)) $
|
||||
when (any (preferredcontentconfigured m) (hereu:map Remote.uuid remotes)) $
|
||||
showwarning
|
||||
where
|
||||
showwarning = earlyWarning $
|
||||
|
@ -1140,6 +1141,8 @@ warnSyncContentTransition o remotes
|
|||
<> " send any content, use --no-content (or -g)"
|
||||
<> " to prepare for that change."
|
||||
<> " (Or you can configure annex.synccontent)"
|
||||
preferredcontentconfigured m u =
|
||||
maybe False (not . isEmpty . fst) (M.lookup u m)
|
||||
|
||||
notOnlyAnnex :: SyncOptions -> Annex Bool
|
||||
notOnlyAnnex o = not <$> onlyAnnex o
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue