export appendonly support
Make `git annex export` check appendonly when removing a file from an export, and not update the location log, since the remote still contains the content. This commit was supported by the NSF-funded DataLad project.
This commit is contained in:
parent
02630b39ee
commit
8b39db20b5
4 changed files with 15 additions and 11 deletions
|
@ -285,11 +285,15 @@ cleanupUnexport r ea db eks loc = do
|
|||
removeExportedLocation db (asKey ek) loc
|
||||
flushDbQueue db
|
||||
|
||||
remaininglocs <- liftIO $
|
||||
concat <$> forM eks (\ek -> getExportedLocation db (asKey ek))
|
||||
when (null remaininglocs) $
|
||||
forM_ eks $ \ek ->
|
||||
logChange (asKey ek) (uuid r) InfoMissing
|
||||
-- A readonly remote can support removeExportLocation to remove
|
||||
-- the file from the exported tree, but still retain the content
|
||||
-- and allow retrieving it.
|
||||
unless (Remote.readonly) $ do
|
||||
remaininglocs <- liftIO $
|
||||
concat <$> forM eks (\ek -> getExportedLocation db (asKey ek))
|
||||
when (null remaininglocs) $
|
||||
forM_ eks $ \ek ->
|
||||
logChange (asKey ek) (uuid r) InfoMissing
|
||||
|
||||
removeEmptyDirectories ea db loc (map asKey eks)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue