--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.
This commit is contained in:
parent
847944e6b1
commit
d13194b230
15 changed files with 145 additions and 102 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue