update for DiffTree type change

Experimentally, using the raw TopFilePath was right here.
This commit is contained in:
Joey Hess 2013-10-17 15:01:23 -04:00
parent 7206dcb376
commit c7b8c776a8

View file

@ -36,6 +36,7 @@ import qualified Annex.Branch
import qualified Option
import Annex.CatFile
import Types.Key
import Git.FilePath
def :: [Command]
def = [withOptions [fromOption] $ command "unused" paramNothing seek
@ -293,9 +294,9 @@ withKeysReferencedInGitRef a ref = do
forM_ ts $ tKey lookAtWorkingTree >=> maybe noop a
liftIO $ void clean
where
tKey True = fmap fst <$$> Backend.lookupFile . DiffTree.file
tKey True = fmap fst <$$> Backend.lookupFile . getTopFilePath . DiffTree.file
tKey False = fileKey . takeFileName . encodeW8 . L.unpack <$$>
catFile ref . DiffTree.file
catFile ref . getTopFilePath . DiffTree.file
{- Looks in the specified directory for bad/tmp keys, and returns a list
- of those that might still have value, or might be stale and removable.