summaryrefslogtreecommitdiff
path: root/Command/Add.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-03-14 17:43:34 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-03-14 17:43:34 -0400
commit60ab3d84e188b8dd3a284d962df25bbee41ff1cb (patch)
tree768d4f632bab0152dbc1ca72f81fc3b9c7915c0a /Command/Add.hs
parenta4f72c9625486786a4549cf4db1b542ea89da7c7 (diff)
added ifM and nuked 11 lines of code
no behavior changes
Diffstat (limited to 'Command/Add.hs')
-rw-r--r--Command/Add.hs9
1 files changed, 5 insertions, 4 deletions
diff --git a/Command/Add.hs b/Command/Add.hs
index b6b5753af..ef839b2a3 100644
--- a/Command/Add.hs
+++ b/Command/Add.hs
@@ -85,8 +85,9 @@ cleanup file key hascontent = do
mtime <- modificationTime <$> getFileStatus file
touch file (TimeSpec mtime) False
- force <- Annex.getState Annex.force
- if force
- then Annex.Queue.add "add" [Param "-f", Param "--"] [file]
- else Annex.Queue.add "add" [Param "--"] [file]
+ params <- ifM (Annex.getState Annex.force)
+ ( return [Param "-f"]
+ , return []
+ )
+ Annex.Queue.add "add" (params++[Param "--"]) [file]
return True