summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-12-10 18:45:55 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-12-10 18:45:55 -0400
commit10e8028a42fe65e8586b7424557b792cf36e215c (patch)
tree1053e88662fd0d5f33e778bbbd2ef52b754ada82
parentbfdc9f28fc6ef19f7e3ec2ea724a540af104a386 (diff)
Fix bug in last version in getting contents from bare repositories.
-rw-r--r--Locations.hs9
-rw-r--r--debian/changelog1
-rw-r--r--doc/bugs/Can__39__t___34__git-annex_get__34___with_3.20111203.mdwn5
3 files changed, 10 insertions, 5 deletions
diff --git a/Locations.hs b/Locations.hs
index 3843495f9..080766841 100644
--- a/Locations.hs
+++ b/Locations.hs
@@ -80,16 +80,15 @@ gitAnnexLocation key r
| Git.repoIsLocalBare r =
{- Bare repositories default to hashDirLower for new
- content, as it's more portable. -}
- go (Git.workTree r) (annexLocations key)
+ check (map inrepo $ annexLocations key)
| otherwise =
{- Non-bare repositories only use hashDirMixed, so
- don't need to do any work to check if the file is
- present. -}
- return $ Git.workTree r </> ".git" </>
- annexLocation key hashDirMixed
+ return $ inrepo ".git" </> annexLocation key hashDirMixed
where
- go dir locs = fromMaybe (dir </> head locs) <$> check dir locs
- check dir = firstM $ \f -> doesFileExist $ dir </> f
+ inrepo = (</>) (Git.workTree r)
+ check locs = fromMaybe (head locs) <$> firstM doesFileExist locs
{- The annex directory of a repository. -}
gitAnnexDir :: Git.Repo -> FilePath
diff --git a/debian/changelog b/debian/changelog
index 8dbcb07dc..5c68fde2d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -12,6 +12,7 @@ git-annex (3.20111204) UNRELEASED; urgency=low
* sync: New command that synchronises the local repository and default
remote, by running git commit, pull, and push for you.
* Version monad-control dependency in cabal file.
+ * Fix bug in last version in getting contents from bare repositories.
-- Joey Hess <joeyh@debian.org> Sun, 04 Dec 2011 12:22:37 -0400
diff --git a/doc/bugs/Can__39__t___34__git-annex_get__34___with_3.20111203.mdwn b/doc/bugs/Can__39__t___34__git-annex_get__34___with_3.20111203.mdwn
index 2e7771386..00ab9f3f0 100644
--- a/doc/bugs/Can__39__t___34__git-annex_get__34___with_3.20111203.mdwn
+++ b/doc/bugs/Can__39__t___34__git-annex_get__34___with_3.20111203.mdwn
@@ -19,3 +19,8 @@ Note there is a call to `stat()` with the full path to the requested file, and *
Using `git bisect` I was able to determine that this bug appeared in commit 64672c62 ("refactor"). Reverting it makes `git-annex-shell` work as expected, but I'm sure there are better ways to fix this. However I don't know enough Haskell to do it myself.
Could you please try to fix this in a future version?
+
+> Thanks for a very good bug report.
+>
+> I've fixed this stupid mistake introduced in the code refactoring.
+> --[[Joey]]