git-annex/Command/Init.hs

36 lines
668 B
Haskell
Raw Normal View History

{- git-annex command
-
- Copyright 2010 Joey Hess <joey@kitenet.net>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Command.Init where
2011-10-05 20:02:51 +00:00
import Common.Annex
import Command
import Annex.UUID
2011-10-15 20:21:08 +00:00
import Logs.UUID
import Init
def :: [Command]
def = [dontCheck repoExists $
command "init" paramDesc seek "initialize git-annex"]
seek :: [CommandSeek]
seek = [withWords start]
2010-11-11 22:54:52 +00:00
start :: [String] -> CommandStart
start ws = do
showStart "init" description
2011-05-15 06:02:46 +00:00
next $ perform description
where
description = unwords ws
perform :: String -> CommandPerform
perform description = do
initialize
u <- getUUID
describeUUID u description
next $ return True