annexInsteadOf config
Added config `url.<base>.annexInsteadOf` corresponding to git's `url.<base>.pushInsteadOf`, to configure the urls to use for accessing the git-annex repositories on a server without needing to configure remote.name.annexUrl in each repository. While one use case for this would be rewriting urls to use annex+http, I decided not to add any kind of special case for that. So while git-annex p2phttp, when serving multiple repositories, needs an url of eg "annex+http://example.com/git-annex/ for each of them, rewriting an url like "https://example.com/git/foo/bar" with this config set to "https://example.com/git/" will result in eg "annex+http://example.com/git-annex/foo/bar", which p2phttp does not support. That seems better dealt with in either git-annex p2phttp or a http middleware, rather than complicating the config with a special case for annex+http. Anyway, there are other use cases for this that don't involve annex+http.
This commit is contained in:
parent
0404968d10
commit
dd052dcba1
7 changed files with 79 additions and 41 deletions
|
@ -10,11 +10,14 @@ 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
|
||||
And you could set 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.
|
||||
|
||||
Update: Implemented that. Let me know if you think it solves your problem
|
||||
well enough.
|
||||
"""]]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue