Git 2.23
[gitweb.git] / t / t5514-fetch-multiple.sh
index b73733219d62cabf02c59ed0bf08caec1158faef..5426d4b5abb4f8ddb03abe4f505a52d53c291c9d 100755 (executable)
@@ -27,7 +27,7 @@ test_expect_success setup '
        (
                cd two && git branch another
        ) &&
-       git clone --mirror two three
+       git clone --mirror two three &&
        git clone one test
 '
 
@@ -105,9 +105,12 @@ test_expect_success 'git fetch --multiple (two remotes)' '
         git remote rm origin &&
         git remote add one ../one &&
         git remote add two ../two &&
-        git fetch --multiple one two &&
+        GIT_TRACE=1 git fetch --multiple one two 2>trace &&
         git branch -r > output &&
-        test_cmp ../expect output)
+        test_cmp ../expect output &&
+        grep "built-in: git gc" trace >gc &&
+        test_line_count = 1 gc
+       )
 '
 
 test_expect_success 'git fetch --multiple (bad remote names)' '
@@ -120,7 +123,7 @@ test_expect_success 'git fetch --all (skipFetchAll)' '
        (cd test4 &&
         for b in $(git branch -r)
         do
-               git branch -r -d $b || break
+               git branch -r -d $b || exit 1
         done &&
         git remote add three ../three &&
         git config remote.three.skipFetchAll true &&
@@ -144,11 +147,40 @@ test_expect_success 'git fetch --multiple (ignoring skipFetchAll)' '
        (cd test4 &&
         for b in $(git branch -r)
         do
-               git branch -r -d $b || break
+               git branch -r -d $b || exit 1
         done &&
         git fetch --multiple one two three &&
         git branch -r > output &&
         test_cmp ../expect output)
 '
 
+test_expect_success 'git fetch --all --no-tags' '
+       git clone one test5 &&
+       git clone test5 test6 &&
+       (cd test5 && git tag test-tag) &&
+       (
+               cd test6 &&
+               git fetch --all --no-tags &&
+               git tag >output
+       ) &&
+       test_must_be_empty test6/output
+'
+
+test_expect_success 'git fetch --all --tags' '
+       echo test-tag >expect &&
+       git clone one test7 &&
+       git clone test7 test8 &&
+       (
+               cd test7 &&
+               test_commit test-tag &&
+               git reset --hard HEAD^
+       ) &&
+       (
+               cd test8 &&
+               git fetch --all --tags &&
+               git tag >output
+       ) &&
+       test_cmp expect test8/output
+'
+
 test_done