diff --git a/Command/AddComputed.hs b/Command/AddComputed.hs index dd6c310b06..02d8826683 100644 --- a/Command/AddComputed.hs +++ b/Command/AddComputed.hs @@ -102,12 +102,11 @@ perform o r = do (Remote.Compute.ImmutableState False) (getInputContent fast) Nothing - (addComputed (Just "adding") True r (reproducible o) chooseBackend Just fast) + (addComputed (Just "adding") r (reproducible o) chooseBackend Just fast) next $ return True addComputed :: Maybe StringContainingQuotedPath - -> Bool -> Remote -> Maybe Reproducible -> (OsPath -> Annex Backend) @@ -117,7 +116,7 @@ addComputed -> OsPath -> NominalDiffTime -> Annex () -addComputed maddaction stagefiles r reproducibleconfig choosebackend destfile fast result tmpdir ts = do +addComputed maddaction r reproducibleconfig choosebackend destfile fast result tmpdir ts = do when (M.null outputs) $ giveup "The computation succeeded, but it did not generate any files." oks <- forM (M.keys outputs) $ \outputfile -> do @@ -148,9 +147,7 @@ addComputed maddaction stagefiles r reproducibleconfig choosebackend destfile fa | fast = do case destfile outputfile of Nothing -> noop - Just f - | stagefiles -> addSymlink f stateurlk Nothing - | otherwise -> makelink f stateurlk + Just f -> addSymlink f stateurlk Nothing return stateurlk | isreproducible = do sz <- liftIO $ getFileSize outputfile' @@ -175,16 +172,10 @@ addComputed maddaction stagefiles r reproducibleconfig choosebackend destfile fa genkey f p = do backend <- choosebackend outputfile fst <$> genKey (ks f) p backend - makelink f k = void $ makeLink f k Nothing - ingesthelper f p mk - | stagefiles = ingestwith $ do + ingesthelper f p mk = + ingestwith $ do k <- maybe (genkey f p) return mk ingestAdd' p (Just (ld f)) (Just k) - | otherwise = ingestwith $ do - k <- maybe (genkey f p) return mk - mk' <- fst <$> ingest p (Just (ld f)) (Just k) - maybe noop (makelink f) mk' - return mk' ingestwith a = a >>= \case Nothing -> giveup "ingestion failed" Just k -> do diff --git a/Command/Recompute.hs b/Command/Recompute.hs index 17246d10e4..82ed7ab37e 100644 --- a/Command/Recompute.hs +++ b/Command/Recompute.hs @@ -137,7 +137,7 @@ perform o r file origkey origstate = do go program reproducibleconfig result tmpdir ts = do checkbehaviorchange program (Remote.Compute.computeState result) - addComputed Nothing False r reproducibleconfig + addComputed Nothing r reproducibleconfig choosebackend destfile False result tmpdir ts checkbehaviorchange program state = do diff --git a/doc/git-annex-recompute.mdwn b/doc/git-annex-recompute.mdwn index 498c85e26c..f10125827c 100644 --- a/doc/git-annex-recompute.mdwn +++ b/doc/git-annex-recompute.mdwn @@ -15,8 +15,7 @@ By default, this only recomputes files whose input files have changed. The new contents of the input files are used to re-run the computation. When the output of the computation is different, the computed file is -updated with the new content. The updated file is written to the worktree, -but is not staged, in order to avoid overwriting any staged changes. +updated with the new content. The updated file is staged in git. # OPTIONS diff --git a/doc/todo/compute_special_remote_remaining_todos.mdwn b/doc/todo/compute_special_remote_remaining_todos.mdwn index 820b423199..c6e5a64de6 100644 --- a/doc/todo/compute_special_remote_remaining_todos.mdwn +++ b/doc/todo/compute_special_remote_remaining_todos.mdwn @@ -1,13 +1,6 @@ This is the remainder of my todo list while I was building the compute special remote. --[[Joey]] -* recompute should stage files in git. Otherwise, - `git-annex drop` after recompute --reproducible drops the staged - file, and `git-annex get` gets the staged file, and if it wasn't - actually reproducible, this is not apparent. - - This is blocking adding the tip. - * Support parallel get of input files. The design allows for this, but how much parallelism makes sense? Would it be possible to use the usual worker pool?