Fix bug in last version in getting contents from bare repositories.
This commit is contained in:
parent
bfdc9f28fc
commit
10e8028a42
3 changed files with 10 additions and 5 deletions
|
@ -80,16 +80,15 @@ gitAnnexLocation key r
|
||||||
| Git.repoIsLocalBare r =
|
| Git.repoIsLocalBare r =
|
||||||
{- Bare repositories default to hashDirLower for new
|
{- Bare repositories default to hashDirLower for new
|
||||||
- content, as it's more portable. -}
|
- content, as it's more portable. -}
|
||||||
go (Git.workTree r) (annexLocations key)
|
check (map inrepo $ annexLocations key)
|
||||||
| otherwise =
|
| otherwise =
|
||||||
{- Non-bare repositories only use hashDirMixed, so
|
{- Non-bare repositories only use hashDirMixed, so
|
||||||
- don't need to do any work to check if the file is
|
- don't need to do any work to check if the file is
|
||||||
- present. -}
|
- present. -}
|
||||||
return $ Git.workTree r </> ".git" </>
|
return $ inrepo ".git" </> annexLocation key hashDirMixed
|
||||||
annexLocation key hashDirMixed
|
|
||||||
where
|
where
|
||||||
go dir locs = fromMaybe (dir </> head locs) <$> check dir locs
|
inrepo = (</>) (Git.workTree r)
|
||||||
check dir = firstM $ \f -> doesFileExist $ dir </> f
|
check locs = fromMaybe (head locs) <$> firstM doesFileExist locs
|
||||||
|
|
||||||
{- The annex directory of a repository. -}
|
{- The annex directory of a repository. -}
|
||||||
gitAnnexDir :: Git.Repo -> FilePath
|
gitAnnexDir :: Git.Repo -> FilePath
|
||||||
|
|
1
debian/changelog
vendored
1
debian/changelog
vendored
|
@ -12,6 +12,7 @@ git-annex (3.20111204) UNRELEASED; urgency=low
|
||||||
* sync: New command that synchronises the local repository and default
|
* sync: New command that synchronises the local repository and default
|
||||||
remote, by running git commit, pull, and push for you.
|
remote, by running git commit, pull, and push for you.
|
||||||
* Version monad-control dependency in cabal file.
|
* 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
|
-- Joey Hess <joeyh@debian.org> Sun, 04 Dec 2011 12:22:37 -0400
|
||||||
|
|
||||||
|
|
|
@ -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.
|
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?
|
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]]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue