Ref ByteString conversion done

Test suite passes.
This commit is contained in:
Joey Hess 2020-04-07 17:41:09 -04:00
parent 6c81e0c8f1
commit c0cd07c36b
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
22 changed files with 72 additions and 47 deletions

View file

@ -72,6 +72,8 @@ import Utility.Process.Transcript
import Control.Concurrent.MVar
import qualified Data.Map as M
import qualified Data.ByteString as S
import Data.Char
cmd :: Command
cmd = withGlobalOptions [jobsOption] $
@ -444,11 +446,11 @@ importRemote o mergeconfig remote currbranch
| otherwise = case remoteAnnexTrackingBranch (Remote.gitconfig remote) of
Nothing -> noop
Just tb -> do
let (b, s) = separate (== ':') (Git.fromRef tb)
let (b, p) = separate' (== (fromIntegral (ord ':'))) (Git.fromRef' tb)
let branch = Git.Ref b
let subdir = if null s
let subdir = if S.null p
then Nothing
else Just (asTopFilePath (toRawFilePath s))
else Just (asTopFilePath p)
Command.Import.seekRemote remote branch subdir
void $ mergeRemote remote currbranch mergeconfig o
where