mirror of
https://code.sup39.dev/repos/Wqawg
synced 2024-12-27 17:34:52 +09:00
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
|
||||
|
||||
darcsRepoSpecP :: Parser RepoSpec
|
||||
darcsRepoSpecP = SpecUserRepo <$> part <* char '/' <*> part <* char '/'
|
||||
darcsRepoSpecP = f <$> part <* char '/' <*> optional (part <* char '/')
|
||||
where
|
||||
f repo Nothing = SpecRepo repo
|
||||
f sharer (Just repo) = SpecUserRepo sharer repo
|
||||
part = takeWhile1 (/= '/')
|
||||
|
||||
gitRepoSpecP :: Parser RepoSpec
|
||||
|
|
Loading…
Reference in a new issue