Browse Source

Merge branch 'cw/doc-pushurl-vs-url'

Doc update.

* cw/doc-pushurl-vs-url:
  Documentation: clarify multiple pushurls vs urls
maint
Junio C Hamano 2 years ago
parent
commit
59397e9b7e
  1. 4
      Documentation/urls-remotes.txt
  2. 8
      t/t5510-fetch.sh

4
Documentation/urls-remotes.txt

@ -33,7 +33,9 @@ config file would appear like this: @@ -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`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

8
t/t5510-fetch.sh

@ -806,6 +806,14 @@ test_expect_success 'fetch.writeCommitGraph with submodules' ' @@ -806,6 +806,14 @@ test_expect_success 'fetch.writeCommitGraph with submodules' '
)
'

# fetches from first configured url
test_expect_success 'fetch from multiple configured URLs in single remote' '
git init url1 &&
git remote add multipleurls url1 &&
git remote set-url --add multipleurls url2 &&
git fetch multipleurls
'

# configured prune tests

set_config_tristate () {

Loading…
Cancel
Save