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