better handling of multiple repositories with the same name
Used to fail with a bad error message, indicating there was no repository with the specified name, or something like that. Now, suggest they use the uuid to disambiguate. * info, enableremotemote, renameremote: Avoid a confusing message when more than one repository matches the user provided name. * info: Exit nonzero when the input is not supported. Sponsored-by: Kevin Mueller on Patreon
This commit is contained in:
parent
826b225ca8
commit
452b080dba
6 changed files with 41 additions and 33 deletions
|
@ -79,10 +79,10 @@ startSpecialRemote name config [] = do
|
|||
m <- SpecialRemote.specialRemoteMap
|
||||
confm <- Logs.Remote.remoteConfigMap
|
||||
Remote.nameToUUID' name >>= \case
|
||||
Right u | u `M.member` m ->
|
||||
([u], _) | u `M.member` m ->
|
||||
startSpecialRemote name config $
|
||||
[(u, fromMaybe M.empty (M.lookup u confm), Nothing)]
|
||||
_ -> unknownNameError "Unknown remote name."
|
||||
(_, msg) -> unknownNameError msg
|
||||
startSpecialRemote name config ((u, c, mcu):[]) =
|
||||
starting "enableremote" ai si $ do
|
||||
let fullconfig = config `M.union` c
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue