initremote: Automatically describe a remote when creating it.

This ensures that all special remotes show up in git annex status.
Before, a special remote that was not manually described, and was not
a current git remote, did not show up there, although initremote did list
it.
This commit is contained in:
Joey Hess 2012-06-07 11:16:48 -04:00
parent 8408a91082
commit 4d1c114e4d
3 changed files with 5 additions and 5 deletions

View file

@ -15,6 +15,7 @@ import qualified Remote
import qualified Logs.Remote
import qualified Types.Remote as R
import Annex.UUID
import Logs.UUID
def :: [Command]
def = [command "initremote"
@ -60,6 +61,7 @@ findByName name = do
where
generate = do
uuid <- liftIO genUUID
describeUUID uuid name
return (uuid, M.insert nameKey name M.empty)
findByName' :: String -> M.Map UUID R.RemoteConfig -> Maybe (UUID, R.RemoteConfig)