diff options
author | Joey Hess <joey@kitenet.net> | 2012-02-14 12:40:40 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-02-14 12:40:40 -0400 |
commit | 90a8b38ac048d2a9a7caeb68d70d5148fb4148b8 (patch) | |
tree | 8095c25b6dbe1308151bd2fd20a88ef88e418cb2 /Command.hs | |
parent | 33e03d58ae2a351b137ca8e32fa704d240e626e0 (diff) |
set oneshot mode on a per-command basis
Avoids ugly (and test suite failing) hack in Command.Version
Diffstat (limited to 'Command.hs')
-rw-r--r-- | Command.hs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Command.hs b/Command.hs index e7ce335c7..13ea167bb 100644 --- a/Command.hs +++ b/Command.hs @@ -8,6 +8,7 @@ module Command ( command, noRepo, + oneShot, withOptions, next, stop, @@ -39,7 +40,11 @@ import Annex.CheckAttr {- Generates a normal command -} command :: String -> String -> [CommandSeek] -> String -> Command -command = Command [] Nothing commonChecks +command = Command [] Nothing commonChecks False + +{- Makes a command run in oneshot mode. -} +oneShot :: Command -> Command +oneShot c = c { cmdoneshot = True } {- Adds a fallback action to a command, that will be run if it's used - outside a git repository. -} |