fix cloning from an annex:: remote with exporttree=yes

Updating the remote list needs the config to be written to the git-annex
branch, which was not done for good reasons. While it would be possible
to instead use Remote.List.remoteGen without writing to the branch, I
already have a plan to discard git-annex branch writes made by
git-remote-annex, so the simplest fix is to write the config to the
branch.

Sponsored-by: k0ld on Patreon
This commit is contained in:
Joey Hess 2024-05-13 14:35:17 -04:00
parent 552b000ef1
commit ddf05c271b
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
2 changed files with 9 additions and 10 deletions

View file

@ -14,9 +14,6 @@ This is implememented and working. Remaining todo list for it:
* Test incremental pushes that don't fast-forward.
* exporttree=yes remote works, but cloning one from the annex:: url
does not, somehow exportTree is not set then.
* Support max-bundles config
* Need to mention git-remote-annex in special remotes page, and perhaps
@ -91,6 +88,12 @@ 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, cloning currently writes the special remote config into remote.log,
which might be slightly different in some way than the config in
remote.log for the same remote. cloning should not change the stored
config of a remote, but that branch write was necessary. So throwing
away the branch write is also good for this case.
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.