summaryrefslogtreecommitdiff
path: root/CmdLine.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-08-17 18:38:26 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-08-17 18:38:26 -0400
commitb7a4ff1c3185404d36d34b372b016be052394a95 (patch)
tree28953385279993b63c28007dd0cfa5e3ea5e853a /CmdLine.hs
parent228a724d1d1e1d2f27763bd5f71473acc4d022d9 (diff)
optimise initialized check
Avoid running external command if annex.version is set.
Diffstat (limited to 'CmdLine.hs')
-rw-r--r--CmdLine.hs3
1 files changed, 1 insertions, 2 deletions
diff --git a/CmdLine.hs b/CmdLine.hs
index 0590f1112..2652e5b8f 100644
--- a/CmdLine.hs
+++ b/CmdLine.hs
@@ -22,7 +22,6 @@ import qualified Git
import Content
import Types
import Command
-import Version
import Options
import Messages
import Init
@@ -59,7 +58,7 @@ parseCmd argv header cmds options = do
{- Checks that the command can be run in the current environment. -}
checkCmdEnviron :: Command -> Annex ()
-checkCmdEnviron command = when (cmdusesrepo command) $ checkVersion $ initializeSafe
+checkCmdEnviron command = when (cmdusesrepo command) ensureInitialized
{- Usage message with lists of commands and options. -}
usage :: String -> [Command] -> [Option] -> String