export: Fix false positive in export conflict detection

It occurred when the same tree was exported by multiple clones. nub out
identical trees.

This commit was sponsored by Jochen Bartl on Patreon.
This commit is contained in:
Joey Hess 2018-10-09 15:54:12 -04:00
parent ca200c561d
commit 91b799d1a6
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
2 changed files with 3 additions and 1 deletions

View file

@ -10,6 +10,8 @@ git-annex (6.20180927) UNRELEASED; urgency=medium
* SETURLPRESENT, SETURIPRESENT, SETURLMISSING, and SETURIMISSING
used to update the presence information of the external special remote
that called them; this was not documented behavior and is no longer done.
* export: Fix false positive in export conflict detection, that occurred
when the same tree was exported by multiple clones.
-- Joey Hess <id@joeyh.name> Thu, 27 Sep 2018 15:27:20 -0400

View file

@ -113,7 +113,7 @@ changeExport r ea db new = do
-- When there was an export conflict, this resolves it.
--
-- The ExportTree is also updated here to reflect the new tree.
case map exportedTreeish old of
case nub (map exportedTreeish old) of
[] -> updateExportTree db emptyTree new
[oldtreesha] -> do
diffmap <- mkDiffMap oldtreesha new db