Fix querying git for object type when operating on a file containing newlines
This typo would make "git cat-file cat-file" fail, and the way it's used, I think it broke querying all info from filenames containing newlines, because the other queries are only run when it succeeds.
This commit is contained in:
parent
ed6ed2e915
commit
bf5dd723d3
2 changed files with 3 additions and 1 deletions
|
@ -182,7 +182,7 @@ querySize r repo = maybe Nothing (readMaybe . takeWhile (/= '\n'))
|
|||
|
||||
queryObjectType :: Ref -> Repo -> IO (Maybe ObjectType)
|
||||
queryObjectType r repo = maybe Nothing (readObjectType . takeWhile (/= '\n'))
|
||||
<$> querySingle (Param "cat-file") r repo hGetContentsStrict
|
||||
<$> querySingle (Param "-t") r repo hGetContentsStrict
|
||||
|
||||
queryContent :: Ref -> Repo -> IO (Maybe L.ByteString)
|
||||
queryContent r repo = fmap (\b -> L.fromChunks [b])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue