]> dgit.raspbian.org Git - git-annex.git/commit
post-receive: use the exporttree=yes remote as a source
authorJoey Hess <joeyh@joeyh.name>
Thu, 8 Aug 2024 16:28:12 +0000 (12:28 -0400)
committerJoey Hess <joeyh@joeyh.name>
Thu, 8 Aug 2024 17:49:53 +0000 (13:49 -0400)
commita2eb3b450a712eefe74e2073050f6e3a4cdd7176
treeb95549eba4293c25e16376e3cb69572736c73dc9
parent7294d23d78cca5cde63ac8b79857fffcf56e2031
post-receive: use the exporttree=yes remote as a source

This handles cases where a single key is used by multiple files in the
exported tree. When using `git-annex push`, the key's content gets
stored in the annexobjects location, and then when the branch is pushed,
it gets renamed from the annexobjects location to the first exported
file. For subsequent exported files, a copy of the content needs to be
made. This causes it to download the key from the remote in order to
upload another copy to it.

This is not needed when using `git push` followed by `git-annex copy --to`
the proxied remote, because the received key is stored at all export
locations then.

Also, fixed handling of the synced branch push, it was exporting master
when synced/master was pushed.

Note that currently, the first push to the remote does not see that it
is able to get a key from it in order to upload it back. It displays
"(not available)". The second push is able to. Since git-annex push
pushes first the synced branch and then the branch, this does end up
with a full export being made, but it is not quite right.
Command/PostReceive.hs
doc/todo/git-annex_proxies.mdwn