fix remote git config vs global git config order

Bug fix: Git configs such as annex.verify were incorrectly overriding
per-remote git configs such as remote.name.annex-verify.

This dates all the way back to 2013,
commit 8a5b397ac4,
where hlint apparently somehow confused me into parsing in the wrong
order. Before that it was correct.

Amazing noone has noticed until now.

Sponsored-by: Kevin Mueller on Patreon
This commit is contained in:
Joey Hess 2021-09-22 10:41:39 -04:00
parent b76a4453cb
commit 55b405a965
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
2 changed files with 7 additions and 2 deletions

View file

@ -1,5 +1,8 @@
git-annex (8.20210904) UNRELEASED; urgency=medium
* Bug fix: Git configs such as annex.verify were incorrectly overriding
per-remote git configs such as remote.name.annex-verify.
(Reversion in version 4.20130323)
* borg: Avoid trying to extract xattrs, ACLS, and bsdflags when
retrieving from a borg repository.
* Resume where it left off when copying a file to/from a local git remote

View file

@ -440,8 +440,10 @@ extractRemoteGitConfig r remotename = do
getmaybebool k = Git.Config.isTrueFalse' =<< getmaybe' k
getmayberead k = readish =<< getmaybe k
getmaybe = fmap fromConfigValue . getmaybe'
getmaybe' k = mplus (Git.Config.getMaybe (annexConfig k) r)
(Git.Config.getMaybe (remoteAnnexConfig remotename k) r)
getmaybe' k =
Git.Config.getMaybe (remoteAnnexConfig remotename k) r
<|>
Git.Config.getMaybe (annexConfig k) r
getoptions k = fromMaybe [] $ words <$> getmaybe k
notempty :: Maybe String -> Maybe String