export: fix multi-file delete bug
authorJoey Hess <joeyh@joeyh.name>
Wed, 9 Nov 2022 20:24:37 +0000 (16:24 -0400)
committerJoey Hess <joeyh@joeyh.name>
Wed, 9 Nov 2022 20:24:37 +0000 (16:24 -0400)
commitb2cc63d5bf625871f8c9d8955018970c88878fa3
treedf93f92f9beed0768491f2f32cc44e196c447c71
parent56d563577ffda1de539edba62486cfad4f81a070
export: fix multi-file delete bug

export: Fix a bug that left a file on a special remote when two files with
the same content were both deleted in the exported tree.

Case of the wrong data structure leading to the wrong result.
The DiffMap now contains all the old filenames, and all the new filenames.

Note that, when 2 files with the same content are both renamed,
it only renames the first, but deletes and re-exports the second.
Improving that is possible, but it would need to use a different temporary
filename. Anyway, that is an unusual case, and there are known to be other
unusual cases where export does not rename with maximum efficiency, IIRC.
(Or maybe this is the case that I remember?)

Sponsored-by: Dartmouth College's OpenNeuro project
CHANGELOG
Command/Export.hs
doc/bugs/Versioned_S3_tree_does_not_unexport_git_objects.mdwn