aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/urls-remotes.txt
diff options
context:
space:
mode:
authorCalvin Wan <calvinwan@google.com>2023-02-07 18:12:27 +0000
committerJunio C Hamano <gitster@pobox.com>2023-02-07 11:02:27 -0800
commitd390e08076b4486b603f0c8496cc09a5eba4106b (patch)
tree20ce516e1f8be026e0b680e1abab81b5f6eacc73 /Documentation/urls-remotes.txt
parent844ede312b4e988881b6e27e352f469d8ab80b2a (diff)
downloadgit-d390e08076b4486b603f0c8496cc09a5eba4106b.tar.gz
Documentation: clarify multiple pushurls vs urls
In a remote with multiple configured URLs, `git remote -v` shows the correct url that fetch uses. However, `git config remote.<remote>.url` returns the last defined url instead. This discrepancy can cause confusion for users with a remote defined as such, since any url defined after the first essentially acts as a pushurl. Add documentation to clarify how fetch interacts with multiple urls and how push interacts with multiple pushurls and urls. Add test affirming interaction between fetch and multiple urls. Signed-off-by: Calvin Wan <calvinwan@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/urls-remotes.txt')
-rw-r--r--Documentation/urls-remotes.txt4
1 files changed, 3 insertions, 1 deletions
diff --git a/Documentation/urls-remotes.txt b/Documentation/urls-remotes.txt
index 86d0008f94..e410912fe5 100644
--- a/Documentation/urls-remotes.txt
+++ b/Documentation/urls-remotes.txt
@@ -33,7 +33,9 @@ config file would appear like this:
------------
The `<pushurl>` is used for pushes only. It is optional and defaults
-to `<URL>`.
+to `<URL>`. Pushing to a remote affects all defined pushurls or to all
+defined urls if no pushurls are defined. Fetch, however, will only
+fetch from the first defined url if muliple urls are defined.
Named file in `$GIT_DIR/remotes`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~