git-annex/Command/ConfigList.hs

31 lines
681 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.ConfigList where
2011-10-05 20:02:51 +00:00
import Common.Annex
import Command
import Annex.UUID
import qualified Git.Config
import Remote.GCrypt (coreGCryptId)
def :: [Command]
2012-09-16 00:46:38 +00:00
def = [noCommit $ command "configlist" paramNothing seek
SectionPlumbing "outputs relevant git configuration"]
seek :: CommandSeek
seek = withNothing start
start :: CommandStart
start = do
2011-10-11 18:43:45 +00:00
u <- getUUID
showConfig "annex.uuid" $ fromUUID u
showConfig coreGCryptId =<< fromRepo (Git.Config.get coreGCryptId "")
2011-05-15 06:02:46 +00:00
stop
where
showConfig k v = liftIO $ putStrLn $ k ++ "=" ++ v