mirror of
https://git.proxmox.com/git/libgit2
synced 2026-08-26 13:02:14 +00:00
remote: apply insteadOf configuration.
A remote's URLs are now modified according to the url.*.insteadOf and url.*.pushInsteadOf configurations. This allows a user to replace URL prefixes by setting the corresponding keys. E.g. "url.foo.insteadOf = bar" would replace the prefix "bar" with the new prefix "foo".
This commit is contained in:
@@ -120,6 +120,9 @@ GIT_EXTERN(const char *) git_remote_name(const git_remote *remote);
|
||||
/**
|
||||
* Get the remote's url
|
||||
*
|
||||
* If url.*.insteadOf has been configured for this URL, it will
|
||||
* return the modified URL.
|
||||
*
|
||||
* @param remote the remote
|
||||
* @return a pointer to the url
|
||||
*/
|
||||
@@ -128,6 +131,9 @@ GIT_EXTERN(const char *) git_remote_url(const git_remote *remote);
|
||||
/**
|
||||
* Get the remote's url for pushing
|
||||
*
|
||||
* If url.*.pushInsteadOf has been configured for this URL, it
|
||||
* will return the modified URL.
|
||||
*
|
||||
* @param remote the remote
|
||||
* @return a pointer to the url or NULL if no special url for pushing is set
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user