git-remote-annex support exporttree=yes remotes

Put the annex objects in .git/annex/objects/ inside the export remote.
This way, when importing from the remote, they will be filtered out.

Note that, when importtree=yes, content identifiers are used, and this
means that pushing to a remote updates the git-annex branch. Urk.
Will need to try to prevent that later, but I already had a todo about
that for other reasons.

Untested!

Sponsored-By: Brock Spratlen on Patreon
This commit is contained in:
Joey Hess 2024-05-13 11:37:47 -04:00
parent 3f848564ac
commit 34eae54ff9
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
4 changed files with 151 additions and 47 deletions

View file

@ -18,6 +18,11 @@ and are in the process of being deleted.
(Lines end with unix `"\n"`, not `"\r\n"`.)
# exporttree=yes remotes
In an exporttree=yes remote, the GITMANIFEST and GITBUNDLE objects are
stored in the remote, under the `.git/annex/objects/` path.
# multiple GITMANIFEST files
Usually there will only be one per special remote, but it's possible for
@ -38,6 +43,6 @@ stored in such a special remote, this procedure will work:
(Note that later bundles can update refs from the versions in previous
bundles.)
When the special remote is encryptee, the GITMANIFEST and GITBUNDLE will
When the special remote is encrypted, the GITMANIFEST and GITBUNDLE will
also be encrypted. To decrypt those manually, see this
[[fairly simple shell script using standard tools|tips/Decrypting_files_in_special_remotes_without_git-annex]].

View file

@ -12,7 +12,7 @@ This is implememented and working. Remaining todo list for it:
* Need to test all types of pushes, barely tested at all.
* Support exporttree=yes remotes.
* Need to test exporttree=yes remotes.
* Support max-bundles config
@ -35,7 +35,7 @@ This is implememented and working. Remaining todo list for it:
where the remote is left with a deleted manifest when a push
is interrupted part way through. This should be recoverable
by caching the manifest locally and re-uploading it when
the remote has no manifest.
the remote has no manifest or prompting the user to merge and re-push.
* datalad-annex supports cloning from the web special remote,
using an url that contains the result of pushing to eg, a directory
@ -87,3 +87,7 @@ This is implememented and working. Remaining todo list for it:
This should be fixable by making git-remote-annex not write to the
git-annex branch, but to eg, a temporary journal directory.
Also, when the remote uses importree=yes, pushing to it updates
content identifiers, which currently get recorded in the git-annex
branch. It would be good to avoid that being written as well.