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:
parent
8ae0db925b
commit
057999f0fc
2 changed files with 6 additions and 16 deletions
|
@ -726,16 +726,13 @@ seekExportContent o rs (currbranch, _) = or <$> forM rs go
|
||||||
(exported, mtbcommitsha) <- case remoteAnnexTrackingBranch (Remote.gitconfig r) of
|
(exported, mtbcommitsha) <- case remoteAnnexTrackingBranch (Remote.gitconfig r) of
|
||||||
Nothing -> nontracking r
|
Nothing -> nontracking r
|
||||||
Just b -> do
|
Just b -> do
|
||||||
|
mtree <- inRepo $ Git.Ref.tree b
|
||||||
mtbcommitsha <- Command.Export.getExportCommit r b
|
mtbcommitsha <- Command.Export.getExportCommit r b
|
||||||
mcur <- maybe
|
case (mtree, mtbcommitsha) of
|
||||||
(return Nothing)
|
(Just tree, Just _) -> do
|
||||||
(inRepo . Git.Ref.tree)
|
Command.Export.changeExport r db tree
|
||||||
(fmap snd mtbcommitsha)
|
return ([mkExported tree []], mtbcommitsha)
|
||||||
case mcur of
|
_ -> nontracking r
|
||||||
Nothing -> nontracking r
|
|
||||||
Just cur -> do
|
|
||||||
Command.Export.changeExport r db cur
|
|
||||||
return ([mkExported cur []], mtbcommitsha)
|
|
||||||
fillexport r db (exportedTreeishes exported) mtbcommitsha
|
fillexport r db (exportedTreeishes exported) mtbcommitsha
|
||||||
|
|
||||||
nontracking r = do
|
nontracking r = do
|
||||||
|
|
|
@ -10,13 +10,6 @@ this.
|
||||||
|
|
||||||
## implementation notes
|
## implementation notes
|
||||||
|
|
||||||
* Does sync --content with remote.name.annex-tracking-branch=master:subdir
|
|
||||||
export the right tree and update the remote tracking branch right?
|
|
||||||
Does it import correctly?
|
|
||||||
|
|
||||||
* Need to support annex-tracking-branch configuration, which documentation
|
|
||||||
says makes git-annex sync and assistant do imports.
|
|
||||||
|
|
||||||
* When on an adjusted unlocked branch, need to import the files unlocked.
|
* When on an adjusted unlocked branch, need to import the files unlocked.
|
||||||
Also, the tracking branch code needs to know about such branches,
|
Also, the tracking branch code needs to know about such branches,
|
||||||
currently it will generate the wrong tracking branch.
|
currently it will generate the wrong tracking branch.
|
||||||
|
|
Loading…
Reference in a new issue