diff options
author | Joey Hess <joeyh@joeyh.name> | 2017-04-07 13:14:53 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2017-04-07 13:14:53 -0400 |
commit | 4a332477b2a7cf56a6c71e4847c3a0a7bc721d41 (patch) | |
tree | da436f39edca06ef95366421ec82ef63221e5f3b /Command | |
parent | e3118ba722c7c7f7438f5149aa644744f943ea2c (diff) |
enableremote: When enabling a non-special remote, param=value parameters can't be used, so error out if any are provided.
This commit was sponsored by Riku Voipio.
Diffstat (limited to 'Command')
-rw-r--r-- | Command/EnableRemote.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Command/EnableRemote.hs b/Command/EnableRemote.hs index 96efce39c..3addd87d7 100644 --- a/Command/EnableRemote.hs +++ b/Command/EnableRemote.hs @@ -39,7 +39,10 @@ start (name:rest) = go =<< filter matchingname <$> Annex.fromRepo Git.remotes matchingname r = Git.remoteName r == Just name go [] = startSpecialRemote name (Logs.Remote.keyValToConfig rest) =<< Annex.SpecialRemote.findExisting name - go (r:_) = startNormalRemote name r + go (r:_) + | null rest = startNormalRemote name r + | otherwise = giveup $ + "That is a normal git remote; passing these parameters does not make sense: " ++ unwords rest startNormalRemote :: Git.RemoteName -> Git.Repo -> CommandStart startNormalRemote name r = do |