diff options
author | Joey Hess <joey@kitenet.net> | 2010-11-10 14:08:28 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-11-10 14:08:28 -0400 |
commit | 31101a8b278a1b875defdea627307ef90ac3df21 (patch) | |
tree | a0b3a9f0129e11aacac7f25dfc3a646ad933bb56 /Command/Lock.hs | |
parent | e826368cecb2e515cc3c4f5f8d0385c025b069a6 (diff) |
use new git function
Diffstat (limited to 'Command/Lock.hs')
-rw-r--r-- | Command/Lock.hs | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/Command/Lock.hs b/Command/Lock.hs index 1be35d612..955749e93 100644 --- a/Command/Lock.hs +++ b/Command/Lock.hs @@ -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 |