use new git function
This commit is contained in:
parent
e826368cec
commit
31101a8b27
1 changed files with 2 additions and 8 deletions
|
@ -45,12 +45,6 @@ perform file = do
|
||||||
isLocked :: FilePath -> Annex Bool
|
isLocked :: FilePath -> Annex Bool
|
||||||
isLocked file = do
|
isLocked file = do
|
||||||
g <- Annex.gitRepo
|
g <- Annex.gitRepo
|
||||||
changed <- typechanged g Nothing
|
typechanged <- liftIO $ Git.typeChangedFiles g file
|
||||||
changedCached <- typechanged g $ Just "--cached"
|
|
||||||
s <- liftIO $ getSymbolicLinkStatus file
|
s <- liftIO $ getSymbolicLinkStatus file
|
||||||
return $ null (changed++changedCached) || isSymbolicLink s
|
return $ (not $ elem file typechanged) || 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"]
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue