In Darcs pull over SSH, support specifying just repo name
This commit is contained in:
parent
099d9a6351
commit
8448355f98
1 changed files with 3 additions and 1 deletions
|
@ -143,8 +143,10 @@ authorize (PublicKey name key) = do
|
||||||
--TOD TODO TODO check paths for safety... no /./ or /../ and so on
|
--TOD TODO TODO check paths for safety... no /./ or /../ and so on
|
||||||
|
|
||||||
darcsRepoSpecP :: Parser RepoSpec
|
darcsRepoSpecP :: Parser RepoSpec
|
||||||
darcsRepoSpecP = SpecUserRepo <$> part <* char '/' <*> part <* char '/'
|
darcsRepoSpecP = f <$> part <* char '/' <*> optional (part <* char '/')
|
||||||
where
|
where
|
||||||
|
f repo Nothing = SpecRepo repo
|
||||||
|
f sharer (Just repo) = SpecUserRepo sharer repo
|
||||||
part = takeWhile1 (/= '/')
|
part = takeWhile1 (/= '/')
|
||||||
|
|
||||||
gitRepoSpecP :: Parser RepoSpec
|
gitRepoSpecP :: Parser RepoSpec
|
||||||
|
|
Loading…
Reference in a new issue