summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Git/UnionMerge.hs12
-rw-r--r--debian/changelog3
2 files changed, 12 insertions, 3 deletions
diff --git a/Git/UnionMerge.hs b/Git/UnionMerge.hs
index 05d512df3..464200af4 100644
--- a/Git/UnionMerge.hs
+++ b/Git/UnionMerge.hs
@@ -38,10 +38,16 @@ merge x y repo = do
catFileStop h
{- Merges a list of branches into the index. Previously staged changes in
- - the index are preserved (and participate in the merge). -}
+ - the index are preserved (and participate in the merge).
+ -
+ - update-index is run once per ref in turn, so that each ref is merged on
+ - top of the merge for the previous ref. It would be more efficient, but
+ - harder to calculate a single union merge involving all the refs, as well
+ - as the index.
+ -}
mergeIndex :: CatFileHandle -> Repo -> [Ref] -> IO ()
-mergeIndex h repo bs =
- streamUpdateIndex repo $ map (\b -> mergeTreeIndex b h repo) bs
+mergeIndex h repo bs = forM_ bs $ \b ->
+ streamUpdateIndex repo [mergeTreeIndex b h repo]
{- For merging two trees. -}
mergeTrees :: Ref -> Ref -> CatFileHandle -> Repo -> Streamer
diff --git a/debian/changelog b/debian/changelog
index 3595eb81b..24fbdc223 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -10,6 +10,9 @@ git-annex (3.20130115) UNRELEASED; urgency=low
in it that is not a git repository.
* Deal with incompatability in gpg2, which caused prompts for encryption
passphrases rather than using the supplied --passphrase-fd.
+ * bugfix: Union merges involving two or more repositories could sometimes
+ result in data from one repository getting lost. This could result
+ in the location log data becoming wrong, and fsck being needed to fix it.
-- Joey Hess <joeyh@debian.org> Mon, 14 Jan 2013 18:35:01 -0400