diff options
author | Joey Hess <joey@kitenet.net> | 2014-03-04 14:31:26 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-03-04 14:31:26 -0400 |
commit | d30e87fa9ded2f7b2c1f8ecbb8d95bc080993b18 (patch) | |
tree | bcd14e8af8d91336168d58679854581cef1d2ed9 /Command | |
parent | d1039b1f632c6e9b90ef2279122cc9d684381bcb (diff) |
much improved test and real fix for FAT symlink loss on conflicted merge
I think that f5ce1a15d7a35b85ffa938ee950f4749bf445939 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.
Diffstat (limited to 'Command')
-rw-r--r-- | Command/Sync.hs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Command/Sync.hs b/Command/Sync.hs index 33b30df13..22a6b6f4d 100644 --- a/Command/Sync.hs +++ b/Command/Sync.hs @@ -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 |