]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t5505-remote.sh
remote prune: print the list of pruned branches
[thirdparty/git.git] / t / t5505-remote.sh
index c6a7bfb4480327ec2db69df5cc0a93a0019faed7..c17d9dcc74e02eb9f7bfc743df85e1e99ae6bd77 100755 (executable)
@@ -165,6 +165,24 @@ test_expect_success 'prune' '
         ! git rev-parse refs/remotes/origin/side)
 '
 
+cat > test/expect << EOF
+Pruning origin
+URL: $(pwd)/one/.git
+ * [would prune] origin/side2
+EOF
+
+test_expect_success 'prune --dry-run' '
+       (cd one &&
+        git branch -m side2 side) &&
+       (cd test &&
+        git remote prune --dry-run origin > output &&
+        git rev-parse refs/remotes/origin/side2 &&
+        ! git rev-parse refs/remotes/origin/side &&
+       (cd ../one &&
+        git branch -m side side2) &&
+        test_cmp expect output)
+'
+
 test_expect_success 'add --mirror && prune' '
        (mkdir mirror &&
         cd mirror &&