diff options
author | Joey Hess <joeyh@joeyh.name> | 2017-05-09 15:04:07 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2017-05-09 15:04:07 -0400 |
commit | 036c90d79289ef3c14c28d69c9d8ab94fca1e841 (patch) | |
tree | 631dea4eac925dae7a24b0fde46ea813e574d2e4 /Types | |
parent | 5098ef192f7cf128836dab02fa424948003f8fd1 (diff) |
annex.backend is the new name for what was annex.backends
It takes a single key-value backend, rather than the unncessary and confusing list.
The old option still works if set.
Simplified some old old code too.
This commit was sponsored by Thomas Hochstein on Patreon.
Diffstat (limited to 'Types')
-rw-r--r-- | Types/GitConfig.hs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Types/GitConfig.hs b/Types/GitConfig.hs index da548d478..714038070 100644 --- a/Types/GitConfig.hs +++ b/Types/GitConfig.hs @@ -48,7 +48,7 @@ data GitConfig = GitConfig , annexNumCopies :: Maybe NumCopies , annexDiskReserve :: Integer , annexDirect :: Bool - , annexBackends :: [String] + , annexBackend :: Maybe String , annexQueueSize :: Maybe Int , annexBloomCapacity :: Maybe Int , annexBloomAccuracy :: Maybe Int @@ -98,7 +98,12 @@ extractGitConfig r = GitConfig , annexDiskReserve = fromMaybe onemegabyte $ readSize dataUnits =<< getmaybe (annex "diskreserve") , annexDirect = getbool (annex "direct") False - , annexBackends = getwords (annex "backends") + , annexBackend = maybe + -- annex.backends is the old name of the option, still used + -- when annex.backend is not set. + (headMaybe $ getwords (annex "backends")) + Just + (getmaybe (annex "backend")) , annexQueueSize = getmayberead (annex "queuesize") , annexBloomCapacity = getmayberead (annex "bloomcapacity") , annexBloomAccuracy = getmayberead (annex "bloomaccuracy") |