fix sync --content with remote.name.annex-tracking-branch=master:subdir

It was exporting the whole tree not just the subdir. Now tested fully
working in both directions.
This commit is contained in:
Joey Hess 2019-03-11 14:07:52 -04:00
parent 8ae0db925b
commit 057999f0fc
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
2 changed files with 6 additions and 16 deletions

View file

@ -726,16 +726,13 @@ seekExportContent o rs (currbranch, _) = or <$> forM rs go
(exported, mtbcommitsha) <- case remoteAnnexTrackingBranch (Remote.gitconfig r) of
Nothing -> nontracking r
Just b -> do
mtree <- inRepo $ Git.Ref.tree b
mtbcommitsha <- Command.Export.getExportCommit r b
mcur <- maybe
(return Nothing)
(inRepo . Git.Ref.tree)
(fmap snd mtbcommitsha)
case mcur of
Nothing -> nontracking r
Just cur -> do
Command.Export.changeExport r db cur
return ([mkExported cur []], mtbcommitsha)
case (mtree, mtbcommitsha) of
(Just tree, Just _) -> do
Command.Export.changeExport r db tree
return ([mkExported tree []], mtbcommitsha)
_ -> nontracking r
fillexport r db (exportedTreeishes exported) mtbcommitsha
nontracking r = do