]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t5505-remote.sh
Fix "git remote update" with remotes.defalt set
[thirdparty/git.git] / t / t5505-remote.sh
index 852ccb5d7d649a71eeab25eadce6940b9c2a6f63..989f1d44a579dedb58597cb65798cc1afbf80856 100755 (executable)
@@ -365,6 +365,17 @@ test_expect_success 'update with arguments' '
 
 '
 
+test_expect_success 'update --prune' '
+
+       (cd one &&
+        git branch -m side2 side3) &&
+       (cd test &&
+        git remote update --prune &&
+        (cd ../one && git branch -m side3 side2)
+        git rev-parse refs/remotes/origin/side3 &&
+        test_must_fail git rev-parse refs/remotes/origin/side2)
+'
+
 cat > one/expect << EOF
   apis/master
   apis/side
@@ -408,6 +419,20 @@ test_expect_success 'update default (overridden, with funny whitespace)' '
 
 '
 
+test_expect_success 'update (with remotes.default defined)' '
+
+       (cd one &&
+        for b in $(git branch -r)
+        do
+               git branch -r -d $b || break
+        done &&
+        git config remotes.default "drosophila" &&
+        git remote update &&
+        git branch -r > output &&
+        test_cmp expect output)
+
+'
+
 test_expect_success '"remote show" does not show symbolic refs' '
 
        git clone one three &&