git-annex/Command/Init.hs

37 lines
682 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
import Command
import qualified Annex
import UUID
2010-11-08 19:15:21 +00:00
import Messages
import Init
command :: [Command]
command = [standaloneCommand "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
g <- Annex.gitRepo
u <- getUUID g
describeUUID u description
next $ return True