Fix a minor bug that caused options provided with -c to be passed multiple times to git.
This commit is contained in:
parent
b166223d48
commit
c8fec6ab03
4 changed files with 19 additions and 3 deletions
|
@ -93,8 +93,11 @@ gitAnnexGlobalOptions = commonGlobalOptions ++
|
|||
where
|
||||
setnumcopies n = Annex.changeState $ \s -> s { Annex.forcenumcopies = Just $ NumCopies n }
|
||||
setuseragent v = Annex.changeState $ \s -> s { Annex.useragent = Just v }
|
||||
setgitconfig v = Annex.adjustGitRepo $ \r -> Git.Config.store (encodeBS' v) $
|
||||
r { gitGlobalOpts = gitGlobalOpts r ++ [Param "-c", Param v] }
|
||||
setgitconfig v = Annex.adjustGitRepo $ \r ->
|
||||
if Param v `elem` gitGlobalOpts r
|
||||
then return r
|
||||
else Git.Config.store (encodeBS' v) $
|
||||
r { gitGlobalOpts = gitGlobalOpts r ++ [Param "-c", Param v] }
|
||||
setdesktopnotify v = Annex.changeState $ \s -> s { Annex.desktopnotify = Annex.desktopnotify s <> v }
|
||||
|
||||
{- Parser that accepts all non-option params. -}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue