diff options
author | Björn Gustavsson <bgustavsson@gmail.com> | 2009-11-09 21:11:06 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-11-10 01:01:07 -0800 |
commit | 7cc91a2f71c95b4e695549b91c4b629f56887a1a (patch) | |
tree | 0838c6b8f23aaf3095332629ce863a2cdb43e939 /t/t5514-fetch-multiple.sh | |
parent | 16679e373fa85a75c85e6e3b4ae5cd58a89a4114 (diff) | |
download | git-7cc91a2f71c95b4e695549b91c4b629f56887a1a.tar.gz git-7cc91a2f71c95b4e695549b91c4b629f56887a1a.tar.xz |
Add the configuration option skipFetchAll
Implement the configuration skipFetchAll option to allow
certain remotes to be skipped when doing 'git fetch --all' and
'git remote update'. The existing skipDefaultUpdate variable
is still honored (by 'git fetch --all' and 'git remote update').
(If both are set in the configuration file with different values,
the value of the last occurrence will be used.)
Signed-off-by: Björn Gustavsson <bgustavsson@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5514-fetch-multiple.sh')
-rwxr-xr-x | t/t5514-fetch-multiple.sh | 40 |
1 files changed, 37 insertions, 3 deletions
diff --git a/t/t5514-fetch-multiple.sh b/t/t5514-fetch-multiple.sh index 69c64ab1e..b73733219 100755 --- a/t/t5514-fetch-multiple.sh +++ b/t/t5514-fetch-multiple.sh @@ -94,9 +94,6 @@ test_expect_success 'git fetch --multiple (but only one remote)' ' cat > expect << EOF one/master one/side - origin/HEAD -> origin/master - origin/master - origin/side two/another two/master two/side @@ -105,6 +102,7 @@ EOF test_expect_success 'git fetch --multiple (two remotes)' ' (git clone one test4 && cd test4 && + git remote rm origin && git remote add one ../one && git remote add two ../two && git fetch --multiple one two && @@ -117,4 +115,40 @@ test_expect_success 'git fetch --multiple (bad remote names)' ' test_must_fail git fetch --multiple four) ' + +test_expect_success 'git fetch --all (skipFetchAll)' ' + (cd test4 && + for b in $(git branch -r) + do + git branch -r -d $b || break + done && + git remote add three ../three && + git config remote.three.skipFetchAll true && + git fetch --all && + git branch -r > output && + test_cmp ../expect output) +' + +cat > expect << EOF + one/master + one/side + three/another + three/master + three/side + two/another + two/master + two/side +EOF + +test_expect_success 'git fetch --multiple (ignoring skipFetchAll)' ' + (cd test4 && + for b in $(git branch -r) + do + git branch -r -d $b || break + done && + git fetch --multiple one two three && + git branch -r > output && + test_cmp ../expect output) +' + test_done |