diff options
author | Joey Hess <joey@kitenet.net> | 2011-08-17 14:36:20 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-08-17 14:44:31 -0400 |
commit | 32f27cc3e839a3c243641b953fd4bd0f15dda08a (patch) | |
tree | 818a65122d2aedd805e475332fe7769c42f70379 /CmdLine.hs | |
parent | cf33eff684de5193379e99745d83c80fd2fb09c0 (diff) |
when reading configs of local repos, first initializeSafe
This auto-generates a uuid if the local repo does not already have one.
Diffstat (limited to 'CmdLine.hs')
-rw-r--r-- | CmdLine.hs | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/CmdLine.hs b/CmdLine.hs index ff1758f0d..0590f1112 100644 --- a/CmdLine.hs +++ b/CmdLine.hs @@ -19,7 +19,6 @@ import Control.Monad (when) import qualified Annex import qualified AnnexQueue import qualified Git -import qualified Branch import Content import Types import Command @@ -60,16 +59,7 @@ parseCmd argv header cmds options = do {- Checks that the command can be run in the current environment. -} checkCmdEnviron :: Command -> Annex () -checkCmdEnviron command = do - when (cmdusesrepo command) $ checkVersion $ do - {- Automatically initialize if there is already a git-annex - branch from somewhere. Otherwise, require a manual init - to avoid git-annex accidentially being run in git - repos that did not intend to use it. -} - annexed <- Branch.hasSomeBranch - if annexed - then initialize - else error "First run: git-annex init" +checkCmdEnviron command = when (cmdusesrepo command) $ checkVersion $ initializeSafe {- Usage message with lists of commands and options. -} usage :: String -> [Command] -> [Option] -> String |