map: Fix display of v5 direct mode repos.

The direct mode guard confused map. So need to run through Annex.new to get
the actual path to the repo.
This commit is contained in:
Joey Hess 2014-01-13 15:36:02 -04:00
parent eaefcd6e7f
commit 7ee87c7bd6
3 changed files with 6 additions and 1 deletions

View file

@ -156,7 +156,9 @@ absRepo :: Git.Repo -> Git.Repo -> Annex Git.Repo
absRepo reference r
| Git.repoIsUrl reference = return $ Git.Construct.localToUrl reference r
| Git.repoIsUrl r = return r
| otherwise = liftIO $ Git.Construct.fromAbsPath =<< absPath (Git.repoPath r)
| otherwise = liftIO $ do
r' <- Git.Construct.fromAbsPath =<< absPath (Git.repoPath r)
flip Annex.eval Annex.gitRepo =<< Annex.new r'
{- Checks if two repos are the same. -}
same :: Git.Repo -> Git.Repo -> Bool