aboutsummaryrefslogtreecommitdiff
path: root/Command/Uninit.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-11-10 23:35:08 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-11-10 23:45:14 -0400
commitb327227ba596d4fc5012138d03390c3eb861b808 (patch)
tree921c3ca6851d1ede45c387d9fd54997dcbf44906 /Command/Uninit.hs
parent4389782628a1cc683ef238e848b6311fc4bd82c3 (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/Uninit.hs')
-rw-r--r--Command/Uninit.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/Command/Uninit.hs b/Command/Uninit.hs
index f317b7620..8987240be 100644
--- a/Command/Uninit.hs
+++ b/Command/Uninit.hs
@@ -33,15 +33,15 @@ check = do
[Params "rev-parse --abbrev-ref HEAD"]
seek :: [CommandSeek]
-seek = [withFilesInGit startUnannex, withNothing start]
+seek = [withFilesInGit $ whenAnnexed startUnannex, withNothing start]
-startUnannex :: FilePath -> CommandStart
-startUnannex file = do
+startUnannex :: FilePath -> (Key, Backend Annex) -> CommandStart
+startUnannex file info = do
-- Force fast mode before running unannex. This way, if multiple
-- files link to a key, it will be left in the annex and hardlinked
-- to by each.
Annex.changeState $ \s -> s { Annex.fast = True }
- Command.Unannex.start file
+ Command.Unannex.start file info
start :: CommandStart
start = next perform