aboutsummaryrefslogtreecommitdiff
path: root/Command/Get.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-07-20 15:22:55 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-07-20 15:23:43 -0400
commit258a3356e6461e0164441bb3a3e202cb9ef889e6 (patch)
treef198f34aaedeffb1af624f918a214527b066175a /Command/Get.hs
parente97cd57e1ac72d5a240852704ebaf92716fcad94 (diff)
--branch, stage 2
Show branch:file that is being operated on. I had to make ActionItem a type and not a type class because withKeyOptions' passed two different types of values when using the type class, and I could not get the type checker to accept that.
Diffstat (limited to 'Command/Get.hs')
-rw-r--r--Command/Get.hs11
1 files changed, 6 insertions, 5 deletions
diff --git a/Command/Get.hs b/Command/Get.hs
index a56661ef4..3f461fa04 100644
--- a/Command/Get.hs
+++ b/Command/Get.hs
@@ -49,17 +49,18 @@ seek o = allowConcurrentOutput $ do
(getFiles o)
start :: GetOptions -> Maybe Remote -> FilePath -> Key -> CommandStart
-start o from file key = start' expensivecheck from key (Just file)
+start o from file key = start' expensivecheck from key afile (mkActionItem afile)
where
+ afile = Just file
expensivecheck
| autoMode o = numCopiesCheck file key (<) <||> wantGet False (Just key) (Just file)
| otherwise = return True
-startKeys :: Maybe Remote -> Key -> CommandStart
+startKeys :: Maybe Remote -> Key -> ActionItem -> CommandStart
startKeys from key = start' (return True) from key Nothing
-start' :: Annex Bool -> Maybe Remote -> Key -> AssociatedFile -> CommandStart
-start' expensivecheck from key afile = stopUnless (not <$> inAnnex key) $
+start' :: Annex Bool -> Maybe Remote -> Key -> AssociatedFile -> ActionItem -> CommandStart
+start' expensivecheck from key afile ai = stopUnless (not <$> inAnnex key) $
stopUnless expensivecheck $
case from of
Nothing -> go $ perform key afile
@@ -68,7 +69,7 @@ start' expensivecheck from key afile = stopUnless (not <$> inAnnex key) $
go $ Command.Move.fromPerform src False key afile
where
go a = do
- showStart' "get" key afile
+ showStart' "get" key ai
next a
perform :: Key -> AssociatedFile -> CommandPerform