From 7ee87c7bd6ce27d1107acb565dcda3623f28f771 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 13 Jan 2014 15:36:02 -0400 Subject: [PATCH] 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. --- Command/Map.hs | 4 +++- debian/changelog | 1 + doc/bugs/broken_git_annex_map_on_direct_mode.mdwn | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Command/Map.hs b/Command/Map.hs index 91f4a02510..575e321228 100644 --- a/Command/Map.hs +++ b/Command/Map.hs @@ -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 diff --git a/debian/changelog b/debian/changelog index 9e7a06db8b..7ccb29ee84 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,7 @@ git-annex (5.20140108) UNRELEASED; urgency=medium * Android: Avoid passing --clobber to busybox wget. * Refuse to build with git older than 1.7.1.1, which is needed for git checkout -B + * map: Fix display of v5 direct mode repos. -- Joey Hess Wed, 08 Jan 2014 13:13:54 -0400 diff --git a/doc/bugs/broken_git_annex_map_on_direct_mode.mdwn b/doc/bugs/broken_git_annex_map_on_direct_mode.mdwn index 2f9431063b..40005a60a2 100644 --- a/doc/bugs/broken_git_annex_map_on_direct_mode.mdwn +++ b/doc/bugs/broken_git_annex_map_on_direct_mode.mdwn @@ -54,3 +54,5 @@ git annex map # End of transcript or log. """]] + +> [[fixed|done]]; thanks for a good test case. --[[Joey]]