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.
This commit is contained in:
parent
20b634c82c
commit
f406d16525
3 changed files with 19 additions and 1 deletions
|
@ -12,6 +12,8 @@ git-annex (6.20170322) UNRELEASED; urgency=medium
|
||||||
necessary because as feared, the extra -n parameter that git-annex
|
necessary because as feared, the extra -n parameter that git-annex
|
||||||
passes breaks uses of these environment variables that expect exactly
|
passes breaks uses of these environment variables that expect exactly
|
||||||
the parameters that git passes.
|
the parameters that git passes.
|
||||||
|
* enableremote: When enabling a non-special remote, param=value
|
||||||
|
parameters can't be used, so error out if any are provided.
|
||||||
|
|
||||||
-- Joey Hess <id@joeyh.name> Wed, 29 Mar 2017 12:41:46 -0400
|
-- Joey Hess <id@joeyh.name> Wed, 29 Mar 2017 12:41:46 -0400
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,10 @@ start (name:rest) = go =<< filter matchingname <$> Annex.fromRepo Git.remotes
|
||||||
matchingname r = Git.remoteName r == Just name
|
matchingname r = Git.remoteName r == Just name
|
||||||
go [] = startSpecialRemote name (Logs.Remote.keyValToConfig rest)
|
go [] = startSpecialRemote name (Logs.Remote.keyValToConfig rest)
|
||||||
=<< Annex.SpecialRemote.findExisting name
|
=<< 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 :: Git.RemoteName -> Git.Repo -> CommandStart
|
||||||
startNormalRemote name r = do
|
startNormalRemote name r = do
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
[[!comment format=mdwn
|
||||||
|
username="joey"
|
||||||
|
subject="""comment 1"""
|
||||||
|
date="2017-04-07T16:54:19Z"
|
||||||
|
content="""
|
||||||
|
This does not happen when I do the same thing with a directory special
|
||||||
|
remote.
|
||||||
|
|
||||||
|
I do reproduce it with gcrypt. It must be missing a call to the code that
|
||||||
|
handles keyid+=.
|
||||||
|
|
||||||
|
Thanks for an excellent bug report!
|
||||||
|
"""]]
|
Loading…
Add table
Add a link
Reference in a new issue