This commit is contained in:
Joey Hess 2024-12-03 13:00:14 -04:00
parent 35b7fa3d34
commit 0404968d10
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
3 changed files with 53 additions and 0 deletions

View file

@ -0,0 +1,19 @@
[[!comment format=mdwn
username="joey"
subject="""comment 6"""
date="2024-12-03T15:48:52Z"
content="""
git-annex does not currently use pushurl, and making it start to use it
would be the same kind of potentially breaking change as making it start to
use pushinsteadof.
I get where you're coming from but just because a lot of people use
pushinstead of that way does not mean that other people don't use it to
redirect pushes to an entirely different clone of the repository.
[Here](https://github.com/git/git/commit/697f652818f211aa48e3c007f25d6177647980c1)
Junio calls using pushurl that way a "common mistake", so I guess he is
seeing people do that. He does have a good point that with such a
configuration refs/remotes/origin won't (usually) reflect the state of both
repos.
"""]]

View file

@ -0,0 +1,14 @@
[[!comment format=mdwn
username="joey"
subject="""comment 7"""
date="2024-12-03T16:06:15Z"
content="""
If git-annex used pushInsteadOf for sending content to a remote, should it
also use it for dropping content from the remote? Dropping is quite far
from pushing. Does it make sense to expect the user to generalize "push" to
"arbitrary write access" when it comes to git-annex's interpretation of
configuration settings that were designed for git?
Granted, `git-annex push` can drop content from the remote when preferred
content is configured to.
"""]]

View file

@ -0,0 +1,20 @@
[[!comment format=mdwn
username="joey"
subject="""comment 8"""
date="2024-12-03T16:15:50Z"
content="""
Maybe what's really missing is `url.<base>.annexInsteadOf`
corresponding to `url.<base>.pushInsteadOf`.
The same way `remote.<name>.annexUrl` corresponds to
`remote.<name>.pushUrl`.
You would need to set 2 configs, but the separation is clear.
And you could do it once in your global git config for whatever
servers you commonly use.
Another benefit to is that the new `git-annex p2phttp` server
needs annexUrl to be configured to a different url than the git url
when using it. annexInsteadOf would let that be configured a
single time for all urls on a given git server.
"""]]