docs for export preferred content

This includes a note about how include= and exclude= match when exporting
a subtree. I don't know if the note is prominent enough, but the
behavior seems unsurprising enough.
This commit is contained in:
Joey Hess 2019-05-20 12:01:37 -04:00
parent 568af1073e
commit 7d177b78e4
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
4 changed files with 37 additions and 7 deletions

View file

@ -11,7 +11,9 @@ been listened to.
It seems doable to make `git annex export` honor whatever
preferred content settings have been configured for the remote.
(And `git annex sync --content` too.)
(And `git annex sync --content` too.)
> done
Problem: A preferred content expression include=subdir/foo or
exclude=subdir/bar matches relative to the top of the repository.
@ -24,6 +26,8 @@ It may be better to add a note that preferred content expressions include=
exclude= etc match relative to the top of the exported tree when exporting
a subtree.
> done
----
> `git annex import` of a tree from a special remote would also be
@ -60,10 +64,23 @@ a subtree.
> version of the branch for preferred content and location tracking.
> (And use of `git-annex forget` could break it.)
>
> It seems easier to instead record the tree of excluded files somewhere,
> Logs.Export already records the whole exported tree in the git-annex
> branch, so extend it to also record the tree of excluded files.
> Complication: Export conflicts.
> Logs.Export already records the tree that the user chose to export
> into the git-annex branch. Should excluded files be present in that
> tree or not? If not, the diff from that tree to the remote tracking
> branch will be the excluded files. Another good reason to do that
> is that if the preferred content settings change, the next export
> will pick up on the change, since the exported tree differs from the tree
> to be exported.
>
> So, plan: Make export of a tree filter that tree through the preferred
> content of the remote, and use the new tree as the tree that really
> gets exported, recording it in the git-annex branch. But the remote
> tracking branch will point to the commit that the user chose to export.
> > (done)
>
> The import then just needs to diff between the last exported tree and
> and the remote tracking branch to get the files that were excluded,
> and add them back into the imported tree.
---