summaryrefslogtreecommitdiff
path: root/GitAnnex.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-09-25 16:48:24 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-09-25 16:48:24 -0400
commit51d5e6b4c716847dc544fa2d56bbe4567f1bfaf4 (patch)
treea13a562265b76a756c1d18b66cc0a194902a0dfb /GitAnnex.hs
parent067974202e285bc8d0840c2c64e9b84fc52c7c21 (diff)
New --time-limit option, makes long git-annex commands stop after a specified amount of time.
Diffstat (limited to 'GitAnnex.hs')
-rw-r--r--GitAnnex.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/GitAnnex.hs b/GitAnnex.hs
index 67aead173..c6fc5210f 100644
--- a/GitAnnex.hs
+++ b/GitAnnex.hs
@@ -141,9 +141,11 @@ options = Option.common ++
"skip files with fewer copies"
, Option ['B'] ["inbackend"] (ReqArg Limit.addInBackend paramName)
"skip files not using a key-value backend"
+ , Option ['T'] ["time-limit"] (ReqArg Limit.addTimeLimit paramTime)
+ "stop after the specified amount of time"
] ++ Option.matcher
where
- setnumcopies v = Annex.changeState $ \s -> s {Annex.forcenumcopies = readish v }
+ setnumcopies v = Annex.changeState $ \s -> s { Annex.forcenumcopies = readish v }
setgitconfig :: String -> Annex ()
setgitconfig v = do
newg <- inRepo $ Git.Config.store v