much improved test and real fix for FAT symlink loss on conflicted merge

I think that 751f496c11 didn't quite manage
to actually fix the bug, although I have not checked since its "fix" got
redone.

The test suite now actually checks the file staged in git is a symlink,
rather than relying on the bug casing a later sync failure. This seems a
more reliable way to detect it, and probably avoids a heisenbug in the test
suite.
This commit is contained in:
Joey Hess 2014-03-04 14:31:26 -04:00
parent b4d6b79618
commit 0afa7ae261
2 changed files with 36 additions and 21 deletions

View file

@ -434,13 +434,14 @@ resolveMerge' u
d <- fromRepo gitAnnexMergeDir
l <- liftIO $ dirContentsRecursive (d </> item)
if null l
then go (d </> item)
else mapM_ go l
then go d (d </> item)
else mapM_ (go d) l
where
go f = do
go d f = do
v <- getAnnexLinkTarget f
let worktreef = makeRelative d f
case v of
Just target -> stageSymlink f
Just target -> stageSymlink worktreef
=<< hashSymlink target
Nothing -> noop