diff options
Diffstat (limited to 'Annex')
-rw-r--r-- | Annex/Branch.hs | 2 | ||||
-rw-r--r-- | Annex/Content/Direct.hs | 2 | ||||
-rw-r--r-- | Annex/Direct.hs | 13 |
3 files changed, 10 insertions, 7 deletions
diff --git a/Annex/Branch.hs b/Annex/Branch.hs index c567db554..f5c490212 100644 --- a/Annex/Branch.hs +++ b/Annex/Branch.hs @@ -334,7 +334,7 @@ withIndex :: Annex a -> Annex a withIndex = withIndex' False withIndex' :: Bool -> Annex a -> Annex a withIndex' bootstrapping a = do - f <- fromRepo gitAnnexIndex + f <- liftIO . absPath =<< fromRepo gitAnnexIndex withIndexFile f $ do checkIndexOnce $ unlessM (liftIO $ doesFileExist f) $ do unless bootstrapping create diff --git a/Annex/Content/Direct.hs b/Annex/Content/Direct.hs index a2df9f6d3..43defdca3 100644 --- a/Annex/Content/Direct.hs +++ b/Annex/Content/Direct.hs @@ -114,7 +114,7 @@ addAssociatedFile key file = do normaliseAssociatedFile :: FilePath -> Annex FilePath normaliseAssociatedFile file = do top <- fromRepo Git.repoPath - liftIO $ relPathDirToFile top <$> absPath file + liftIO $ relPathDirToFile top file {- Checks if a file in the tree, associated with a key, has not been modified. - diff --git a/Annex/Direct.hs b/Annex/Direct.hs index 6292f027f..710227e7e 100644 --- a/Annex/Direct.hs +++ b/Annex/Direct.hs @@ -160,8 +160,8 @@ addDirect file cache = do -} mergeDirect :: Maybe Git.Ref -> Maybe Git.Ref -> Git.Branch -> Annex Bool -> Git.Branch.CommitMode -> Annex Bool mergeDirect startbranch oldref branch resolvemerge commitmode = exclusively $ do - reali <- fromRepo indexFile - tmpi <- fromRepo indexFileLock + reali <- liftIO . absPath =<< fromRepo indexFile + tmpi <- liftIO . absPath =<< fromRepo indexFileLock liftIO $ copyFile reali tmpi d <- fromRepo gitAnnexMergeDir @@ -198,9 +198,12 @@ stageMerge d branch commitmode = do merger <- ifM (coreSymlinks <$> Annex.getGitConfig) ( return Git.Merge.stageMerge , return $ \ref -> Git.Merge.mergeNonInteractive ref commitmode - ) - inRepo $ \g -> merger branch $ - g { location = Local { gitdir = Git.localGitDir g, worktree = Just d } } + ) + inRepo $ \g -> do + wd <- liftIO $ absPath d + gd <- liftIO $ absPath $ Git.localGitDir g + merger branch $ + g { location = Local { gitdir = gd, worktree = Just (addTrailingPathSeparator wd) } } {- Commits after a direct mode merge is complete, and after the work - tree has been updated by mergeDirectCleanup. |