aboutsummaryrefslogtreecommitdiff
path: root/Command/ConfigList.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-08-05 14:09:25 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-08-05 14:09:25 -0400
commit593af3d79581a00af7a25897750fc5b1c2e0e0ab (patch)
tree0a3ee8d1577476d1c38113e696818723b9a972ff /Command/ConfigList.hs
parenta43686b9847c19efebd1f15519083436ac155a8e (diff)
git-annex-shell: Don't let configlist auto-init repository when in readonly mode.
This was potentially a hole in the readonly mode armor even before my last commit. If the user could push a git-annex branch to a repo, they could get git-annex-shell to initialize the repo. After my last commit, the user didn't even need to be allowed to push a branch to init the repo, so this hole certianly needs to be closed now.
Diffstat (limited to 'Command/ConfigList.hs')
-rw-r--r--Command/ConfigList.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/Command/ConfigList.hs b/Command/ConfigList.hs
index e65d0f033..46c909107 100644
--- a/Command/ConfigList.hs
+++ b/Command/ConfigList.hs
@@ -15,6 +15,7 @@ import qualified Annex.Branch
import qualified Git.Config
import Remote.GCrypt (coreGCryptId)
import qualified CmdLine.GitAnnexShell.Fields as Fields
+import CmdLine.GitAnnexShell.Checks
cmd :: Command
cmd = noCommit $ dontCheck repoExists $
@@ -44,6 +45,7 @@ findOrGenUUID = do
then return u
else ifM (Annex.Branch.hasSibling <||> (isJust <$> Fields.getField Fields.autoInit))
( do
+ liftIO checkNotReadOnly
initialize Nothing
getUUID
, return NoUUID