2010-12-31 00:08:22 +00:00
|
|
|
{- 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
|
2010-12-31 00:08:22 +00:00
|
|
|
import Command
|
2011-10-15 21:47:03 +00:00
|
|
|
import Annex.UUID
|
2013-09-24 21:25:47 +00:00
|
|
|
import qualified Git.Config
|
|
|
|
import Remote.GCrypt (coreGCryptId)
|
2010-12-31 00:08:22 +00:00
|
|
|
|
2011-10-29 19:19:05 +00:00
|
|
|
def :: [Command]
|
2012-09-16 00:46:38 +00:00
|
|
|
def = [noCommit $ command "configlist" paramNothing seek
|
2013-03-24 22:28:21 +00:00
|
|
|
SectionPlumbing "outputs relevant git configuration"]
|
2010-12-31 00:08:22 +00:00
|
|
|
|
|
|
|
seek :: [CommandSeek]
|
|
|
|
seek = [withNothing start]
|
|
|
|
|
2011-09-15 20:50:49 +00:00
|
|
|
start :: CommandStart
|
2010-12-31 00:08:22 +00:00
|
|
|
start = do
|
2011-10-11 18:43:45 +00:00
|
|
|
u <- getUUID
|
2013-09-24 21:25:47 +00:00
|
|
|
showConfig "annex.uuid" $ fromUUID u
|
|
|
|
showConfig coreGCryptId =<< fromRepo (Git.Config.get coreGCryptId "")
|
2011-05-15 06:02:46 +00:00
|
|
|
stop
|
2013-09-24 21:25:47 +00:00
|
|
|
where
|
|
|
|
showConfig k v = liftIO $ putStrLn $ k ++ "=" ++ v
|