Optimised union merging; now only runs git cat-file once.

This commit is contained in:
Joey Hess 2011-11-12 17:45:12 -04:00
parent cea65b9e5b
commit 04edae6791
7 changed files with 62 additions and 36 deletions

View file

@ -197,7 +197,7 @@ getKeysReferencedInGit ref = do
findkeys c (l:ls)
| isSymLink (LsTree.mode l) = do
content <- catFile ref $ LsTree.file l
case fileKey (takeFileName content) of
case fileKey (takeFileName $ L.unpack content) of
Nothing -> findkeys c ls
Just k -> findkeys (k:c) ls
| otherwise = findkeys c ls