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.
This commit is contained in:
parent
c20143ee32
commit
f1b0a4b404
22 changed files with 90 additions and 70 deletions
|
@ -188,7 +188,7 @@ check cs = all id <$> sequence cs
|
|||
-}
|
||||
fixLink :: Key -> FilePath -> Annex Bool
|
||||
fixLink key file = do
|
||||
want <- calcGitLink file key
|
||||
want <- inRepo $ gitAnnexLink file key
|
||||
have <- getAnnexLinkTarget file
|
||||
maybe noop (go want) have
|
||||
return True
|
||||
|
@ -223,7 +223,7 @@ verifyLocationLog key desc = do
|
|||
{- Since we're checking that a key's file is present, throw
|
||||
- in a permission fixup here too. -}
|
||||
when (present && not direct) $ do
|
||||
file <- inRepo $ gitAnnexLocation key
|
||||
file <- calcRepo $ gitAnnexLocation key
|
||||
freezeContent file
|
||||
freezeContentDir file
|
||||
|
||||
|
@ -281,7 +281,7 @@ checkKeySize :: Key -> Annex Bool
|
|||
checkKeySize key = ifM isDirect
|
||||
( return True
|
||||
, do
|
||||
file <- inRepo $ gitAnnexLocation key
|
||||
file <- calcRepo $ gitAnnexLocation key
|
||||
ifM (liftIO $ doesFileExist file)
|
||||
( checkKeySizeOr badContent key file
|
||||
, return True
|
||||
|
@ -322,7 +322,7 @@ checkKeySizeOr bad key file = case Types.Key.keySize key of
|
|||
-}
|
||||
checkBackend :: Backend -> Key -> Annex Bool
|
||||
checkBackend backend key = do
|
||||
file <- inRepo $ gitAnnexLocation key
|
||||
file <- calcRepo $ gitAnnexLocation key
|
||||
ifM isDirect
|
||||
( ifM (goodContent key file)
|
||||
( checkBackendOr' (badContentDirect file) backend key file
|
||||
|
@ -443,14 +443,14 @@ needFsck _ _ = return True
|
|||
-}
|
||||
recordFsckTime :: Key -> Annex ()
|
||||
recordFsckTime key = do
|
||||
parent <- parentDir <$> inRepo (gitAnnexLocation key)
|
||||
parent <- parentDir <$> calcRepo (gitAnnexLocation key)
|
||||
liftIO $ void $ tryIO $ do
|
||||
touchFile parent
|
||||
setSticky parent
|
||||
|
||||
getFsckTime :: Key -> Annex (Maybe EpochTime)
|
||||
getFsckTime key = do
|
||||
parent <- parentDir <$> inRepo (gitAnnexLocation key)
|
||||
parent <- parentDir <$> calcRepo (gitAnnexLocation key)
|
||||
liftIO $ catchDefaultIO Nothing $ do
|
||||
s <- getFileStatus parent
|
||||
return $ if isSticky $ fileMode s
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue