summaryrefslogtreecommitdiff
path: root/Git/CatFile.hs
diff options
context:
space:
mode:
authorJoeyHess <>2019-10-09 16:34:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2019-10-09 16:34:00 (GMT)
commit66f771a916b67bd08f4070487e79e4a4359fd852 (patch)
tree6e09eba777f8bcebac4f30093c63f3ffd029e741 /Git/CatFile.hs
parent09e89c7ef80c7e879bfe1376102101cca6baf130 (diff)
version 7.201910097.20191009
Diffstat (limited to 'Git/CatFile.hs')
-rw-r--r--Git/CatFile.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/Git/CatFile.hs b/Git/CatFile.hs
index e49976a..49b8945 100644
--- a/Git/CatFile.hs
+++ b/Git/CatFile.hs
@@ -132,6 +132,10 @@ query hdl object newlinefallback receive
-- filename itself contains a newline, have to fall back to another
-- method of getting the information.
| '\n' `elem` s = newlinefallback
+ -- git strips carriage return from the end of a line, out of some
+ -- misplaced desire to support windows, so also use the newline
+ -- fallback for those.
+ | "\r" `isSuffixOf` s = newlinefallback
| otherwise = CoProcess.query hdl send receive
where
send to = hPutStrLn to s