t5523-push-upstream: add function to ensure fresh upstream repo
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Tay Ray Chuan committed
Oct 17, 2010 at 02:37 UTC
2d59ced10418f60914f353031215ecc6adcef204
1 file changed
+5
-1
t/t5523-push-upstream.sh
+5
-1
@@ -3,8 +3,12 @@
3
test_description='push with --set-upstream'
4
. ./test-lib.sh
5
6
+ensure_fresh_upstream() {
7
+ rm -rf parent && git init --bare parent
8
+}
9
+
10
test_expect_success 'setup bare parent' '
7
- git init --bare parent &&
11
+ ensure_fresh_upstream &&
12
git remote add upstream parent
13
'
14