initremote --describe-other-params

Does not yet include descriptions from external special remote programs.
This commit is contained in:
Joey Hess 2020-01-20 16:05:51 -04:00
parent 2f8822307f
commit aa949bbb7d
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
6 changed files with 60 additions and 20 deletions

View file

@ -72,7 +72,10 @@ findType config = maybe unspecified (specified . fromProposedAccepted) $
where
unspecified = Left "Specify the type of remote with type="
specified s = case filter (findtype s) remoteTypes of
[] -> Left $ "Unknown remote type " ++ s
[] -> Left $ "Unknown remote type " ++ s
++ " (pick from: "
++ intercalate " " (map typename remoteTypes)
++ ")"
(t:_) -> Right t
findtype s i = typename i == s