Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjörn Gustavsson <bgustavsson@gmail.com>2009-11-09 23:09:56 +0300
committerJunio C Hamano <gitster@pobox.com>2009-11-10 12:01:06 +0300
commit9c4a036b34acef63ab754f0e27e5e54bd9d9a210 (patch)
tree6ac68c7a493eeb43b5fa0d78445fe34f3c294431 /t/t5506-remote-groups.sh
parent6b276e19fa71fabe64039cf004aba908d7083e82 (diff)
Teach the --all option to 'git fetch'
'git remote' is meant for managing remotes and 'git fetch' is meant for actually fetching data from remote repositories. Therefore, it is not logical that you must use 'git remote update' to fetch from more than one repository at once. Add the --all option to 'git fetch', to tell it to attempt to fetch from all remotes. Also, if --all is not given, the <repository> argument is allowed to be the name of a group, to allow fetching from all repositories in the group. Other options except -v and -q are silently ignored. Signed-off-by: Björn Gustavsson <bgustavsson@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5506-remote-groups.sh')
-rwxr-xr-xt/t5506-remote-groups.sh21
1 files changed, 19 insertions, 2 deletions
diff --git a/t/t5506-remote-groups.sh b/t/t5506-remote-groups.sh
index 2a1806b0b4..b7b7ddaa40 100755
--- a/t/t5506-remote-groups.sh
+++ b/t/t5506-remote-groups.sh
@@ -51,7 +51,7 @@ test_expect_success 'nonexistant group produces error' '
! repo_fetched two
'
-test_expect_success 'updating group updates all members' '
+test_expect_success 'updating group updates all members (remote update)' '
mark group-all &&
update_repos &&
git config --add remotes.all one &&
@@ -61,7 +61,15 @@ test_expect_success 'updating group updates all members' '
repo_fetched two
'
-test_expect_success 'updating group does not update non-members' '
+test_expect_success 'updating group updates all members (fetch)' '
+ mark fetch-group-all &&
+ update_repos &&
+ git fetch all &&
+ repo_fetched one &&
+ repo_fetched two
+'
+
+test_expect_success 'updating group does not update non-members (remote update)' '
mark group-some &&
update_repos &&
git config --add remotes.some one &&
@@ -70,6 +78,15 @@ test_expect_success 'updating group does not update non-members' '
! repo_fetched two
'
+test_expect_success 'updating group does not update non-members (fetch)' '
+ mark fetch-group-some &&
+ update_repos &&
+ git config --add remotes.some one &&
+ git remote update some &&
+ repo_fetched one &&
+ ! repo_fetched two
+'
+
test_expect_success 'updating remote name updates that remote' '
mark remote-name &&
update_repos &&