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 /Assistant/Threads | |
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 'Assistant/Threads')
-rw-r--r-- | Assistant/Threads/Committer.hs | 2 | ||||
-rw-r--r-- | Assistant/Threads/Watcher.hs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Assistant/Threads/Committer.hs b/Assistant/Threads/Committer.hs index 46d77db92..bee359d59 100644 --- a/Assistant/Threads/Committer.hs +++ b/Assistant/Threads/Committer.hs @@ -312,7 +312,7 @@ handleAdds delayadd cs = returnWhen (null incomplete) $ do done change file key = liftAnnex $ do logStatus key InfoPresent link <- ifM isDirect - ( calcGitLink file key + ( inRepo $ gitAnnexLink file key , Command.Add.link file key True ) whenM (pure DirWatcher.eventsCoalesce <||> isDirect) $ do diff --git a/Assistant/Threads/Watcher.hs b/Assistant/Threads/Watcher.hs index 17de03dbc..9bd78b62b 100644 --- a/Assistant/Threads/Watcher.hs +++ b/Assistant/Threads/Watcher.hs @@ -201,7 +201,7 @@ onAddDirect matcher file fs = do - just been deleted and been put back, - so it symlink is restaged to make sure. -} ( do - link <- liftAnnex $ calcGitLink file key + link <- liftAnnex $ inRepo $ gitAnnexLink file key addLink file link (Just key) , do debug ["changed direct", file] @@ -222,7 +222,7 @@ onAddSymlink isdirect file filestatus = go =<< liftAnnex (Backend.lookupFile fil go (Just (key, _)) = do when isdirect $ liftAnnex $ void $ addAssociatedFile key file - link <- liftAnnex $ calcGitLink file key + link <- liftAnnex $ inRepo $ gitAnnexLink file key ifM ((==) (Just link) <$> liftIO (catchMaybeIO $ readSymbolicLink file)) ( ensurestaged (Just link) (Just key) =<< getDaemonStatus , do |