Make --numcopies override annex.numcopies set in .gitattributes.

This commit is contained in:
Joey Hess 2013-07-09 12:05:56 -04:00
parent deaf471eb7
commit b3db88252c
5 changed files with 12 additions and 3 deletions

View file

@ -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