layout
This commit is contained in:
parent
4050c24d7b
commit
949ef94d5e
1 changed files with 6 additions and 5 deletions
|
@ -36,11 +36,12 @@ lsTree repo t = map parseLsTree <$>
|
||||||
{- Parses a line of ls-tree output.
|
{- Parses a line of ls-tree output.
|
||||||
- (The --long format is not currently supported.) -}
|
- (The --long format is not currently supported.) -}
|
||||||
parseLsTree :: L.ByteString -> TreeItem
|
parseLsTree :: L.ByteString -> TreeItem
|
||||||
parseLsTree l = TreeItem
|
parseLsTree l = TreeItem
|
||||||
(fst $ head $ readOct $ L.unpack m)
|
{ mode = fst $ head $ readOct $ L.unpack m
|
||||||
(L.unpack t)
|
, typeobj = L.unpack t
|
||||||
(L.unpack s)
|
, sha = L.unpack s
|
||||||
(decodeGitFile $ L.unpack f)
|
, file = decodeGitFile $ L.unpack f
|
||||||
|
}
|
||||||
where
|
where
|
||||||
-- l = <mode> SP <type> SP <sha> TAB <file>
|
-- l = <mode> SP <type> SP <sha> TAB <file>
|
||||||
-- All fields are fixed, so we can pull them out of
|
-- All fields are fixed, so we can pull them out of
|
||||||
|
|
Loading…
Reference in a new issue