summaryrefslogtreecommitdiff
path: root/Remote.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-06-26 17:15:17 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-06-26 17:22:44 -0400
commit7e62e57f8c9ea49250399f385ee898667df80800 (patch)
tree47319d3f40691b87e76751efc5b634a01cf8680c /Remote.hs
parenta7b8c807d9ea101e36ca4175781e68d641413bea (diff)
Avoid ugly failure mode when moving content from a local repository that is not available.
Prelude.undefined error message was introduced by bb4f31a0ee496ffb83d31cc56f8827e47605d763. It seems best to filter out local repositories that cannot be accessed from the list of remotes, rather than keeping them in and making every thing that uses the list have to deal with remotes that may have an unknown location. Besides fixing the error message, this also makes unavailable local remotes' names not be shown in various messages, including in git annex status output. Also, move --to an unavailable local repository now avoids some ugly errors like "changeWorkingDirectory: does not exist".
Diffstat (limited to 'Remote.hs')
-rw-r--r--Remote.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Remote.hs b/Remote.hs
index 839c6ddb0..e211ef7cb 100644
--- a/Remote.hs
+++ b/Remote.hs
@@ -75,7 +75,7 @@ byName' :: String -> Annex (Either String Remote)
byName' "" = return $ Left "no remote specified"
byName' n = handle . filter matching <$> remoteList
where
- handle [] = Left $ "there is no git remote named \"" ++ n ++ "\""
+ handle [] = Left $ "there is no available git remote named \"" ++ n ++ "\""
handle match = Right $ Prelude.head match
matching r = n == name r || toUUID n == uuid r