diff options
author | Joey Hess <joey@kitenet.net> | 2013-04-04 15:46:33 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-04-04 15:46:33 -0400 |
commit | a7cc06b30d3ae8a9801a68729db23dd66f8dadf6 (patch) | |
tree | b500f785b37815cf82d82da299881e07931ab27c /Annex/Content/Direct.hs | |
parent | 307212395c912ab268109521ceae1bf192f728d8 (diff) |
Use lower case hash directories for storing files on crippled filesystems, same as is already done for bare repositories.
* since this is a crippled filesystem anyway, git-annex doesn't use
symlinks on it
* so there's no reason to use the mixed case hash directories that we're
stuck using to avoid breaking everyone's symlinks to the content
* so we can do what is already done for all bare repos, and make non-bare
repos on crippled filesystems use the all-lower case hash directories
* which are, happily, all 3 letters long, so they cannot conflict with
mixed case hash directories
* so I was able to 100% fix this and even resuming `git annex add` in the
test case will recover and it will all just work.
Diffstat (limited to 'Annex/Content/Direct.hs')
-rw-r--r-- | Annex/Content/Direct.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Annex/Content/Direct.hs b/Annex/Content/Direct.hs index 25e257918..1f9ddb784 100644 --- a/Annex/Content/Direct.hs +++ b/Annex/Content/Direct.hs @@ -42,7 +42,7 @@ associatedFiles key = do - the top of the repo. -} associatedFilesRelative :: Key -> Annex [FilePath] associatedFilesRelative key = do - mapping <- inRepo $ gitAnnexMapping key + mapping <- calcRepo $ gitAnnexMapping key liftIO $ catchDefaultIO [] $ do h <- openFile mapping ReadMode fileEncoding h @@ -52,7 +52,7 @@ associatedFilesRelative key = do - transformation to the list. Returns new associatedFiles value. -} changeAssociatedFiles :: Key -> ([FilePath] -> [FilePath]) -> Annex [FilePath] changeAssociatedFiles key transform = do - mapping <- inRepo $ gitAnnexMapping key + mapping <- calcRepo $ gitAnnexMapping key files <- associatedFilesRelative key let files' = transform files when (files /= files') $ do @@ -124,7 +124,7 @@ removeInodeCache key = withInodeCacheFile key $ \f -> do liftIO $ nukeFile f withInodeCacheFile :: Key -> (FilePath -> Annex a) -> Annex a -withInodeCacheFile key a = a =<< inRepo (gitAnnexInodeCache key) +withInodeCacheFile key a = a =<< calcRepo (gitAnnexInodeCache key) {- Checks if a InodeCache matches the current version of a file. -} sameInodeCache :: FilePath -> Maybe InodeCache -> Annex Bool |