Added the annex.fullybalancedthreshhold git config.

This commit is contained in:
Joey Hess 2024-08-22 07:15:55 -04:00
parent 3fe67744b1
commit 70e2fca257
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
4 changed files with 6 additions and 3 deletions

View file

@ -163,6 +163,7 @@ data GitConfig = GitConfig
, annexAdviceNoSshCaching :: Bool
, annexViewUnsetDirectory :: ViewUnset
, annexClusters :: M.Map RemoteName ClusterUUID
, annexFullyBalancedThreshhold :: Double
}
extractGitConfig :: ConfigSource -> Git.Repo -> GitConfig
@ -296,6 +297,9 @@ extractGitConfig configsource r = GitConfig
M.mapMaybe (mkClusterUUID . toUUID) $
M.mapKeys removeclusterprefix $
M.filterWithKey isclusternamekey (config r)
, annexFullyBalancedThreshhold =
fromMaybe 0.9 $ (/ 100) <$> getmayberead
(annexConfig "fullybalancedthreshhold")
}
where
getbool k d = fromMaybe d $ getmaybebool k