diff options
author | Joey Hess <joeyh@joeyh.name> | 2017-05-11 16:03:50 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2017-05-11 16:05:01 -0400 |
commit | 54c524f1660e40e4b302279c7571cf2f9c9d5488 (patch) | |
tree | 6d0f7f20c7b0f8e0d175715c2b495e7a4b0b25ce /Remote/Git.hs | |
parent | 60dfbb240d4db6cb1a6f8ca9cf71400d461d8aa5 (diff) |
de-Maybe remoteGitConfig
It's always set, so does not need to be a Maybe.
Diffstat (limited to 'Remote/Git.hs')
-rw-r--r-- | Remote/Git.hs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Remote/Git.hs b/Remote/Git.hs index 78213f4f7..5c69473fd 100644 --- a/Remote/Git.hs +++ b/Remote/Git.hs @@ -165,8 +165,7 @@ gen r u c gc , config = c , localpath = localpathCalc r , repo = r - , gitconfig = gc - { remoteGitConfig = Just $ extractGitConfig r } + , gitconfig = gc { remoteGitConfig = extractGitConfig r } , readonly = Git.repoIsHttp r , availability = availabilityCalc r , remotetype = remote @@ -351,7 +350,7 @@ keyUrls r key = map tourl locs' locs' = map (replace "\\" "/") locs #endif remoteconfig = gitconfig r - cfg = fromJust $ remoteGitConfig remoteconfig + cfg = remoteGitConfig remoteconfig dropKey :: Remote -> Key -> Annex Bool dropKey r key @@ -520,7 +519,7 @@ copyFromRemoteCheap :: Remote -> Key -> AssociatedFile -> FilePath -> Annex Bool copyFromRemoteCheap r key af file | not $ Git.repoIsUrl (repo r) = guardUsable (repo r) (return False) $ liftIO $ do loc <- gitAnnexLocation key (repo r) $ - fromJust $ remoteGitConfig $ gitconfig r + remoteGitConfig $ gitconfig r ifM (doesFileExist loc) ( do absloc <- absPath loc |