From b14b041bfa448dff6a486b3e04910741732b8c0e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 9 Jul 2013 12:05:56 -0400 Subject: Make --numcopies override annex.numcopies set in .gitattributes. --- Command.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Command.hs') diff --git a/Command.hs b/Command.hs index 06126103b..8083e0d7c 100644 --- a/Command.hs +++ b/Command.hs @@ -99,7 +99,11 @@ isBareRepo :: Annex Bool isBareRepo = fromRepo Git.repoIsLocalBare numCopies :: FilePath -> Annex (Maybe Int) -numCopies file = readish <$> checkAttr "annex.numcopies" file +numCopies file = do + forced <- Annex.getState Annex.forcenumcopies + case forced of + Just n -> return $ Just n + Nothing -> readish <$> checkAttr "annex.numcopies" file numCopiesCheck :: FilePath -> Key -> (Int -> Int -> Bool) -> Annex Bool numCopiesCheck file key vs = do -- cgit v1.2.3