graft in imported tree to avoid gc

Fix a bug that could prevent getting files from an importtree=yes remote,
because the imported tree was allowed to be garbage collected.
This commit is contained in:
Joey Hess 2020-12-23 14:27:38 -04:00
parent c6e693b25d
commit 7916fc98a3
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
5 changed files with 58 additions and 34 deletions

View file

@ -192,7 +192,7 @@ changeExport r db (PreferredFiltered new) = do
-- from a previous export, that are not part of this export.
c <- Annex.getState Annex.errcounter
when (c == 0) $ do
recordExport (uuid r) $ ExportChange
recordExportUnderway (uuid r) $ ExportChange
{ oldTreeish = exportedTreeishes old
, newTreeish = new
}