From f7404a64c0ae1a7224f87c7dd3e1459801d7fdce Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 23 Jul 2024 21:16:56 -0400 Subject: [PATCH] Propagate --force to git-annex transferrer And other child processes. --- Annex/Path.hs | 6 +++++- CHANGELOG | 1 + ...orce_option_not_propagated_to_git-annex-transferrer.mdwn | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Annex/Path.hs b/Annex/Path.hs index aa51da1b58..c131ddba0f 100644 --- a/Annex/Path.hs +++ b/Annex/Path.hs @@ -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]) diff --git a/CHANGELOG b/CHANGELOG index c14e78ed55..cf71820055 100644 --- 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 Tue, 02 Jul 2024 12:14:53 -0400 diff --git a/doc/bugs/force_option_not_propagated_to_git-annex-transferrer.mdwn b/doc/bugs/force_option_not_propagated_to_git-annex-transferrer.mdwn index e5473e68ca..ceb757e1a2 100644 --- a/doc/bugs/force_option_not_propagated_to_git-annex-transferrer.mdwn +++ b/doc/bugs/force_option_not_propagated_to_git-annex-transferrer.mdwn @@ -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]]