Propagate --force to git-annex transferrer
authorJoey Hess <joeyh@joeyh.name>
Wed, 24 Jul 2024 01:16:56 +0000 (21:16 -0400)
committerJoey Hess <joeyh@joeyh.name>
Wed, 24 Jul 2024 01:16:56 +0000 (21:16 -0400)
And other child processes.

Annex/Path.hs
CHANGELOG
doc/bugs/force_option_not_propagated_to_git-annex-transferrer.mdwn

index aa51da1b58f65941f4572f06a6856fa309dfcb3c..c131ddba0f6a93dc28bd78ff8681ff7d9bc6f035 100644 (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])
index c14e78ed55b487223ea78e44224a0f05cf7ada65..cf718200557f32dc1c875a7625c9a10430215450 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -6,6 +6,7 @@ git-annex (10.20240702) UNRELEASED; urgency=medium
     git-annex remotedaemon is killed while locking a key to prevent its
     removal.
   * Added a dependency on clock.
+  * Propagate --force to git-annex transferrer.
 
  -- Joey Hess <id@joeyh.name>  Tue, 02 Jul 2024 12:14:53 -0400
 
index e5473e68cab1695d340f42543652747343359051..ceb757e1a29e92bf4329110d0ae6657e7da3654c 100644 (file)
@@ -4,3 +4,5 @@ setting, the message displayed says that --force will override the check.
 But that doesn't work in this case. 
 
 The --force option should be propagated to this command. --[[Joey]]
+
+> [[fixed|done]] --[[Joey]]