From b327227ba596d4fc5012138d03390c3eb861b808 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 10 Nov 2011 23:35:08 -0400 Subject: better limiting of start actions to only run whenAnnexed Mostly only refactoring, but this does remove one redundant stat of the symlink by copy. --- Command/Fix.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Command/Fix.hs') diff --git a/Command/Fix.hs b/Command/Fix.hs index b46d6e8ec..27c4b167e 100644 --- a/Command/Fix.hs +++ b/Command/Fix.hs @@ -17,11 +17,11 @@ def = [command "fix" paramPaths seek "fix up symlinks to point to annexed content"] seek :: [CommandSeek] -seek = [withFilesInGit start] +seek = [withFilesInGit $ whenAnnexed start] {- Fixes the symlink to an annexed file. -} -start :: FilePath -> CommandStart -start file = isAnnexed file $ \(key, _) -> do +start :: FilePath -> (Key, Backend Annex) -> CommandStart +start file (key, _) = do link <- calcGitLink file key l <- liftIO $ readSymbolicLink file if link == l -- cgit v1.2.3