diff options
author | Joey Hess <joeyh@joeyh.name> | 2017-01-30 15:11:26 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2017-01-30 15:27:25 -0400 |
commit | dc2095666d7b8e39ec3e1f2f26dca7eceff34877 (patch) | |
tree | 1318374f174afc23da83910d0a23aa24c0ae4af7 /Logs | |
parent | 0a3f602b6367d7ac71947e9d38ea8004f28a465a (diff) |
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.
Diffstat (limited to 'Logs')
-rw-r--r-- | Logs/NumCopies.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Logs/NumCopies.hs b/Logs/NumCopies.hs index a4bca5b07..7593d6c03 100644 --- a/Logs/NumCopies.hs +++ b/Logs/NumCopies.hs @@ -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) |