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:
parent
67ffb8bada
commit
26d23e38f1
5 changed files with 39 additions and 8 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue