summaryrefslogtreecommitdiff
path: root/Command/ConfigList.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Command/ConfigList.hs')
-rw-r--r--Command/ConfigList.hs8
1 files changed, 5 insertions, 3 deletions
diff --git a/Command/ConfigList.hs b/Command/ConfigList.hs
index 95498ba20..e65d0f033 100644
--- a/Command/ConfigList.hs
+++ b/Command/ConfigList.hs
@@ -14,9 +14,10 @@ import Annex.Init
import qualified Annex.Branch
import qualified Git.Config
import Remote.GCrypt (coreGCryptId)
+import qualified CmdLine.GitAnnexShell.Fields as Fields
cmd :: Command
-cmd = noCommit $
+cmd = noCommit $ dontCheck repoExists $
command "configlist" SectionPlumbing
"outputs relevant git configuration"
paramNothing (withParams seek)
@@ -34,13 +35,14 @@ start = do
showConfig k v = liftIO $ putStrLn $ k ++ "=" ++ v
{- The repository may not yet have a UUID; automatically initialize it
- - when there's a git-annex branch available. -}
+ - when there's a git-annex branch available or if the autoinit field was
+ - set. -}
findOrGenUUID :: Annex UUID
findOrGenUUID = do
u <- getUUID
if u /= NoUUID
then return u
- else ifM Annex.Branch.hasSibling
+ else ifM (Annex.Branch.hasSibling <||> (isJust <$> Fields.getField Fields.autoInit))
( do
initialize Nothing
getUUID