use new git function

This commit is contained in:
Joey Hess 2010-11-10 14:08:28 -04:00
parent e826368cec
commit 31101a8b27

View file

@ -45,12 +45,6 @@ perform file = do
isLocked :: FilePath -> Annex Bool
isLocked file = do
g <- Annex.gitRepo
changed <- typechanged g Nothing
changedCached <- typechanged g $ Just "--cached"
typechanged <- liftIO $ Git.typeChangedFiles g file
s <- liftIO $ getSymbolicLinkStatus file
return $ null (changed++changedCached) || isSymbolicLink s
where
typechanged g Nothing = typechanged' g params
typechanged g (Just param) = typechanged' g $ params++[param]
typechanged' g p = liftIO $ Git.pipeRead g $ p++[file]
params = ["diff", "--name-only", "--diff-filter=T"]
return $ (not $ elem file typechanged) || isSymbolicLink s