vicfg: Include the numcopies configuation.

Docs say vicfg can configure everything from git-annex branch,
so it ought to configure numcopies.

Note that commenting out existing numcopies does not unset it.

This commit was sponsored by Thom May on Patreon.
This commit is contained in:
Joey Hess 2017-01-30 15:11:26 -04:00
parent 67ffb8bada
commit 26d23e38f1
No known key found for this signature in database
GPG key ID: C910D9222512E3C7
5 changed files with 39 additions and 8 deletions

View file

@ -24,7 +24,10 @@ instance SingleValueSerializable NumCopies where
deserialize = NumCopies <$$> readish
setGlobalNumCopies :: NumCopies -> Annex ()
setGlobalNumCopies = setLog numcopiesLog
setGlobalNumCopies new = do
curr <- getGlobalNumCopies
when (curr /= Just new) $
setLog numcopiesLog new
{- Value configured in the numcopies log. Cached for speed. -}
getGlobalNumCopies :: Annex (Maybe NumCopies)