Propagate --force to git-annex transferrer

And other child processes.
This commit is contained in:
Joey Hess 2024-07-23 21:16:56 -04:00
parent 7d4045277a
commit f7404a64c0
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
3 changed files with 8 additions and 1 deletions

View file

@ -85,7 +85,11 @@ gitAnnexChildProcess subcmd ps f a = do
gitAnnexChildProcessParams :: String -> [CommandParam] -> Annex [CommandParam]
gitAnnexChildProcessParams subcmd ps = do
cps <- gitAnnexGitConfigOverrides
return (Param subcmd : cps ++ ps)
force <- Annex.getRead Annex.force
let cps' = if force
then Param "--force" : cps
else cps
return (Param subcmd : cps' ++ ps)
gitAnnexGitConfigOverrides :: Annex [CommandParam]
gitAnnexGitConfigOverrides = concatMap (\c -> [Param "-c", Param c])