proxying to exporttree=yes annexobjects=yes basically working

It works when using git-annex sync/push/assist, or when manually sending
all content to the proxied remote before pushing to the proxy remote.
But when the push comes before the content is sent, sending content does
not update the exported tree.
This commit is contained in:
Joey Hess 2024-08-06 14:18:30 -04:00
parent be5c86c248
commit 3289b1ad02
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
8 changed files with 164 additions and 54 deletions

View file

@ -26,8 +26,12 @@ import Types.Availability
import Types.GitConfig
import Types.RemoteConfig
import Git.Types
import Git.FilePath
import Annex.SpecialRemote.Config
import Data.Char
import qualified Data.ByteString as S
{- Looks up a setting in git config. This is not as efficient as using the
- GitConfig type. -}
getConfig :: ConfigKey -> ConfigValue -> Annex ConfigValue
@ -99,3 +103,12 @@ pidLockFile = ifM (annexPidLock <$> Annex.getGitConfig)
#else
pidLockFile = pure Nothing
#endif
splitRemoteAnnexTrackingBranchSubdir :: Git.Ref -> (Git.Ref, Maybe TopFilePath)
splitRemoteAnnexTrackingBranchSubdir tb = (branch, subdir)
where
(b, p) = separate' (== (fromIntegral (ord ':'))) (Git.fromRef' tb)
branch = Git.Ref b
subdir = if S.null p
then Nothing
else Just (asTopFilePath p)