remove workaround for bug in git 1.8.4r0

This commit is contained in:
Joey Hess 2013-10-20 15:23:06 -04:00
parent 39a3758154
commit f482de1b76
2 changed files with 2 additions and 26 deletions

View file

@ -73,10 +73,7 @@ catObjectDetails (CatFileHandle hdl repo) object = CoProcess.query hdl send rece
| otherwise -> dne
_
| header == show object ++ " missing" -> dne
| otherwise ->
if any isSpace query
then fallback
else error $ "unknown response from git cat-file " ++ show (header, object)
| otherwise -> error $ "unknown response from git cat-file " ++ show (header, object)
readcontent bytes from sha = do
content <- S.hGet from bytes
eatchar '\n' from
@ -87,28 +84,6 @@ catObjectDetails (CatFileHandle hdl repo) object = CoProcess.query hdl send rece
when (c /= expected) $
error $ "missing " ++ (show expected) ++ " from git cat-file"
{- Work around a bug in git 1.8.4 rc0 which broke it for filenames
- containing spaces. http://bugs.debian.org/718517
- Slow! Also can use a lot of memory, if the object is large. -}
fallback = do
let p = gitCreateProcess
[ Param "cat-file"
, Param "-p"
, Param query
] repo
(_, Just h, _, pid) <- withNullHandle $ \h ->
createProcess p
{ std_out = CreatePipe
, std_err = UseHandle h
}
fileEncoding h
content <- L.hGetContents h
let sha = (\s -> length s `seq` s) (show $ sha1 content)
ok <- checkSuccessProcess pid
return $ if ok
then Just (content, Ref sha)
else Nothing
{- Gets a list of files and directories in a tree. (Not recursive.) -}
catTree :: CatFileHandle -> Ref -> IO [(FilePath, FileMode)]
catTree h treeref = go <$> catObjectDetails h treeref

1
debian/changelog vendored
View file

@ -31,6 +31,7 @@ git-annex (4.20131003) UNRELEASED; urgency=low
locations.
* Windows: Deal with strange msysgit 1.8.4 behavior of not understanding
DOS formatted paths for --git-dir and --work-tree.
* Removed workaround for bug in git 1.8.4r0.
-- Joey Hess <joeyh@debian.org> Thu, 03 Oct 2013 15:41:24 -0400