Fix a minor bug that caused options provided with -c to be passed multiple times to git.

This commit is contained in:
Joey Hess 2020-03-16 13:06:44 -04:00
parent b166223d48
commit c8fec6ab03
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
4 changed files with 19 additions and 3 deletions

View file

@ -325,7 +325,11 @@ overrideGitConfig f = changeState $ \s -> s
}
{- Adds an adjustment to the Repo data. Adjustments persist across reloads
- of the repo's config. -}
- of the repo's config.
-
- Note that the action may run more than once, and should avoid eg,
- appending the same value to a repo's config when run repeatedly.
-}
adjustGitRepo :: (Git.Repo -> IO Git.Repo) -> Annex ()
adjustGitRepo a = do
changeState $ \s -> s { repoadjustment = \r -> repoadjustment s r >>= a }