aboutsummaryrefslogtreecommitdiff
path: root/Command.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-07-09 12:05:56 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-07-09 12:05:56 -0400
commitb14b041bfa448dff6a486b3e04910741732b8c0e (patch)
tree7dc01563e83a80a8ffc647fb7d0f8f3d55275ccf /Command.hs
parent48d561a7053fdcc42bf11cb41a0e0b73c5b70d68 (diff)
Make --numcopies override annex.numcopies set in .gitattributes.
Diffstat (limited to 'Command.hs')
-rw-r--r--Command.hs6
1 files changed, 5 insertions, 1 deletions
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