add dropFromEnd
This commit is contained in:
parent
acb4bcf2db
commit
850d19d038
5 changed files with 10 additions and 6 deletions
|
@ -26,8 +26,7 @@ isRemoteKey k = "remote." `isPrefixOf` k && ".url" `isSuffixOf` k
|
|||
|
||||
{- Get a remote's name from the config key that specifies its location. -}
|
||||
remoteKeyToRemoteName :: String -> RemoteName
|
||||
remoteKeyToRemoteName k = intercalate "." $
|
||||
reverse $ drop 1 $ reverse $ drop 1 $ splitc '.' k
|
||||
remoteKeyToRemoteName k = intercalate "." $ dropFromEnd 1 $ drop 1 $ splitc '.' k
|
||||
|
||||
{- Construct a legal git remote name out of an arbitrary input string.
|
||||
-
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue