summaryrefslogtreecommitdiff
path: root/Git/RefLog.hs
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2020-05-04 15:38:39 -0400
committerJoey Hess <joeyh@joeyh.name>2020-05-04 15:38:39 -0400
commit8c4352a0a544b2e5a4ed717999fc7c6ecb0a328f (patch)
treed57aca56117598b06bf30e5a1ed96f4b77e51f09 /Git/RefLog.hs
parent6ea7eac330f73699d965cef7b8ee23d7218415a8 (diff)
downloadgit-repair-8c4352a0a544b2e5a4ed717999fc7c6ecb0a328f.tar.gz
merge from git-annex
* Improve fetching from a remote with an url in host:path format. * Merge from git-annex.
Diffstat (limited to 'Git/RefLog.hs')
-rw-r--r--Git/RefLog.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/Git/RefLog.hs b/Git/RefLog.hs
index 7ba8713..b98833c 100644
--- a/Git/RefLog.hs
+++ b/Git/RefLog.hs
@@ -12,6 +12,9 @@ import Git
import Git.Command
import Git.Sha
+import qualified Data.ByteString as S
+import qualified Data.ByteString.Char8 as S8
+
{- Gets the reflog for a given branch. -}
get :: Branch -> Repo -> IO [Sha]
get b = getMulti [b]
@@ -21,7 +24,7 @@ getMulti :: [Branch] -> Repo -> IO [Sha]
getMulti bs = get' (map (Param . fromRef) bs)
get' :: [CommandParam] -> Repo -> IO [Sha]
-get' ps = mapMaybe extractSha . lines . decodeBS <$$> pipeReadStrict ps'
+get' ps = mapMaybe (extractSha . S.copy) . S8.lines <$$> pipeReadStrict ps'
where
ps' = catMaybes
[ Just $ Param "log"