more OsPath conversion
Sponsored-by: Leon Schuermann
This commit is contained in:
parent
ee0964e61b
commit
f3539efc16
18 changed files with 156 additions and 153 deletions
|
@ -76,14 +76,14 @@ doMerge hashhandle ch differ repo streamer = do
|
|||
void $ cleanup
|
||||
where
|
||||
go [] = noop
|
||||
go (info:file:rest) = mergeFile info file hashhandle ch >>=
|
||||
go (info:file:rest) = mergeFile info (toOsPath file) hashhandle ch >>=
|
||||
maybe (go rest) (\l -> streamer l >> go rest)
|
||||
go (_:[]) = giveup $ "parse error " ++ show differ
|
||||
|
||||
{- Given an info line from a git raw diff, and the filename, generates
|
||||
- a line suitable for update-index that union merges the two sides of the
|
||||
- diff. -}
|
||||
mergeFile :: S.ByteString -> RawFilePath -> HashObjectHandle -> CatFileHandle -> IO (Maybe L.ByteString)
|
||||
mergeFile :: S.ByteString -> OsPath -> HashObjectHandle -> CatFileHandle -> IO (Maybe L.ByteString)
|
||||
mergeFile info file hashhandle h = case S8.words info of
|
||||
[_colonmode, _bmode, asha, bsha, _status] ->
|
||||
case filter (`notElem` nullShas) [Ref asha, Ref bsha] of
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue