summaryrefslogtreecommitdiff
path: root/Logs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2017-01-30 15:11:26 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2017-01-30 15:27:25 -0400
commitdc2095666d7b8e39ec3e1f2f26dca7eceff34877 (patch)
tree1318374f174afc23da83910d0a23aa24c0ae4af7 /Logs
parent0a3f602b6367d7ac71947e9d38ea8004f28a465a (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.hs5
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)