diff options
author | Joey Hess <joey@kitenet.net> | 2011-11-10 23:35:08 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-11-10 23:45:14 -0400 |
commit | b327227ba596d4fc5012138d03390c3eb861b808 (patch) | |
tree | 921c3ca6851d1ede45c387d9fd54997dcbf44906 /Command/Unannex.hs | |
parent | 4389782628a1cc683ef238e848b6311fc4bd82c3 (diff) |
better limiting of start actions to only run whenAnnexed
Mostly only refactoring, but this does remove one redundant stat of the
symlink by copy.
Diffstat (limited to 'Command/Unannex.hs')
-rw-r--r-- | Command/Unannex.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Command/Unannex.hs b/Command/Unannex.hs index d24f921a9..b9190ce04 100644 --- a/Command/Unannex.hs +++ b/Command/Unannex.hs @@ -21,11 +21,11 @@ def :: [Command] def = [command "unannex" paramPaths seek "undo accidential add command"] seek :: [CommandSeek] -seek = [withFilesInGit start] +seek = [withFilesInGit $ whenAnnexed start] {- The unannex subcommand undoes an add. -} -start :: FilePath -> CommandStart -start file = isAnnexed file $ \(key, _) -> do +start :: FilePath -> (Key, Backend Annex) -> CommandStart +start file (key, _) = do ishere <- inAnnex key if ishere then do |