t5523-push-upstream: add function to ensure fresh upstream repo
[gitweb.git] / t / t5523-push-upstream.sh
index 00da70763bc34fe05dcba90a48799e32880571ce..5a18533ad7965b82a656ba779bfc8098a13339c4 100755 (executable)
@@ -3,8 +3,12 @@
 test_description='push with --set-upstream'
 . ./test-lib.sh
 
+ensure_fresh_upstream() {
+       rm -rf parent && git init --bare parent
+}
+
 test_expect_success 'setup bare parent' '
-       git init --bare parent &&
+       ensure_fresh_upstream &&
        git remote add upstream parent
 '