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>
maint
Tay Ray Chuan 2010-10-17 02:37:01 +08:00 committed by Junio C Hamano
parent e674c17db2
commit 2d59ced104
1 changed files with 5 additions and 1 deletions

View File

@ -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
'