diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-01-28 16:11:28 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-01-28 16:11:28 -0400 |
commit | 82161654830b0dc4187e9928555c9321ef61bb89 (patch) | |
tree | fef3edba1366663956ed484a9c9951616765d505 /Config.hs | |
parent | 7ca8ec00a7fcda71a08d22f06838424765a1b215 (diff) |
import Data.Default in Common
Diffstat (limited to 'Config.hs')
-rw-r--r-- | Config.hs | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -23,7 +23,7 @@ instance Show ConfigKey where {- Looks up a setting in git config. -} getConfig :: ConfigKey -> String -> Annex String -getConfig (ConfigKey key) def = fromRepo $ Git.Config.get key def +getConfig (ConfigKey key) d = fromRepo $ Git.Config.get key d getConfigMaybe :: ConfigKey -> Annex (Maybe String) getConfigMaybe (ConfigKey key) = fromRepo $ Git.Config.getMaybe key @@ -58,7 +58,7 @@ annexConfig key = ConfigKey $ "annex." ++ key - by remote.<name>.annex-cost, or if remote.<name>.annex-cost-command - is set and prints a number, that is used. -} remoteCost :: RemoteGitConfig -> Cost -> Annex Cost -remoteCost c def = fromMaybe def <$> remoteCost' c +remoteCost c d = fromMaybe d <$> remoteCost' c remoteCost' :: RemoteGitConfig -> Annex (Maybe Cost) remoteCost' c = case remoteAnnexCostCommand c of |