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

@ -161,7 +161,7 @@ recordImportTree remote importtreeconfig importable = do
updateexportlog importedtree = do
oldexport <- getExport (Remote.uuid remote)
recordExport (Remote.uuid remote) $ ExportChange
recordExport (Remote.uuid remote) importedtree $ ExportChange
{ oldTreeish = exportedTreeishes oldexport
, newTreeish = importedtree
}