3 test_description
='git remote group handling'
4 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
=main
5 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
15 echo content
>>file &&
17 git commit
-F ..
/mark
)
26 if test "$(git log -1 --pretty=format:%s $1 --)" = "$(cat mark)"; then
27 echo >&2 "repo was fetched: $1"
30 echo >&2 "repo was not fetched: $1"
34 test_expect_success
'setup' '
35 mkdir one && (cd one && git init) &&
36 mkdir two && (cd two && git init) &&
37 git remote add -m main one one &&
38 git remote add -m main two two
41 test_expect_success
'no group updates all' '
49 test_expect_success
'nonexistent group produces error' '
52 test_must_fail git remote update nonexistent &&
57 test_expect_success
'updating group updates all members (remote update)' '
60 git config --add remotes.all one &&
61 git config --add remotes.all two &&
62 git remote update all &&
67 test_expect_success
'updating group updates all members (fetch)' '
68 mark fetch-group-all &&
75 test_expect_success
'updating group does not update non-members (remote update)' '
78 git config --add remotes.some one &&
79 git remote update some &&
84 test_expect_success
'updating group does not update non-members (fetch)' '
85 mark fetch-group-some &&
87 git config --add remotes.some one &&
88 git remote update some &&
93 test_expect_success
'updating remote name updates that remote' '
96 git remote update one &&