remove workaround for bug in git 1.8.4r0
This commit is contained in:
parent
39a3758154
commit
f482de1b76
2 changed files with 2 additions and 26 deletions
|
@ -73,10 +73,7 @@ catObjectDetails (CatFileHandle hdl repo) object = CoProcess.query hdl send rece
|
||||||
| otherwise -> dne
|
| otherwise -> dne
|
||||||
_
|
_
|
||||||
| header == show object ++ " missing" -> dne
|
| header == show object ++ " missing" -> dne
|
||||||
| otherwise ->
|
| otherwise -> error $ "unknown response from git cat-file " ++ show (header, object)
|
||||||
if any isSpace query
|
|
||||||
then fallback
|
|
||||||
else error $ "unknown response from git cat-file " ++ show (header, object)
|
|
||||||
readcontent bytes from sha = do
|
readcontent bytes from sha = do
|
||||||
content <- S.hGet from bytes
|
content <- S.hGet from bytes
|
||||||
eatchar '\n' from
|
eatchar '\n' from
|
||||||
|
@ -87,28 +84,6 @@ catObjectDetails (CatFileHandle hdl repo) object = CoProcess.query hdl send rece
|
||||||
when (c /= expected) $
|
when (c /= expected) $
|
||||||
error $ "missing " ++ (show expected) ++ " from git cat-file"
|
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.) -}
|
{- Gets a list of files and directories in a tree. (Not recursive.) -}
|
||||||
catTree :: CatFileHandle -> Ref -> IO [(FilePath, FileMode)]
|
catTree :: CatFileHandle -> Ref -> IO [(FilePath, FileMode)]
|
||||||
catTree h treeref = go <$> catObjectDetails h treeref
|
catTree h treeref = go <$> catObjectDetails h treeref
|
||||||
|
|
1
debian/changelog
vendored
1
debian/changelog
vendored
|
@ -31,6 +31,7 @@ git-annex (4.20131003) UNRELEASED; urgency=low
|
||||||
locations.
|
locations.
|
||||||
* Windows: Deal with strange msysgit 1.8.4 behavior of not understanding
|
* Windows: Deal with strange msysgit 1.8.4 behavior of not understanding
|
||||||
DOS formatted paths for --git-dir and --work-tree.
|
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
|
-- Joey Hess <joeyh@debian.org> Thu, 03 Oct 2013 15:41:24 -0400
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue