Merge branch 'sameas'

This commit is contained in:
Joey Hess 2019-10-14 16:07:19 -04:00
commit 123d0d9add
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
61 changed files with 818 additions and 461 deletions

View file

@ -17,6 +17,11 @@ make enableremote with a new url= add that as urlN=.
[[support_multiple_special_remotes_with_same_uuid]] would solve it, perhaps
in a cleaner way.
> If each url is treated as a separate special remote (which makes a lot of sense
> by analogy with how regular git remotes work), then
> [[support_multiple_special_remotes_with_same_uuid]] could be used to
> solve this.
Problem: The user might go in and change the remote's url to point to some
other server with a different git-lfs backend. In fact, they could already
do so! Remembering the urls actually would let the special remote detect

View file

@ -0,0 +1,35 @@
[[!comment format=mdwn
username="joey"
subject="""comment 12"""
date="2019-10-11T19:56:12Z"
content="""
Looking over all my comments now that I have an implementatation..
`git annex dead` on a sameas remote name marks the parent remote dead.
I think this is ok; dead means the content is gone, so which remote is used
to access it is immaterial; they're all dead.
sameas loops are not a problem, it only looks up the sameas-uuid value
once, will not loop.
old git-annex are prevented from enabling a sameas remote, since it has no
name=
old git-annex with an enabled sameas remote will see the annex-uuid of the
parent, and treat it as the parent. Some git config values needed to use
the parent may not be set, or may potentially be set differently than for
the parent. Unlikely to cause any bad behavior, other than the remote not
working.
encrypted data and legacy chunking is inherited, and cannot be overridden
RemoteConfig always contains any inherited parameters of a sameas remote.
Logs.Remote.configSet filters those out.
Logs.Remote.configSet is a little bit less safe; if its caller passed the
RemoteConfig from a sameas remote, it needs to make sure to not pass the
uuid of the parent remote, or it will overwrite the wrong config. All calls
to it handle that now.
per-remote state still to be done.
"""]]