summaryrefslogtreecommitdiff
path: root/t/t5523-push-upstream.sh
diff options
context:
space:
mode:
authorTay Ray Chuan <rctay89@gmail.com>2010-10-16 18:37:01 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-10-18 23:20:19 (GMT)
commit2d59ced10418f60914f353031215ecc6adcef204 (patch)
treed8919de0be1f84d9406aba9ab8ad26113df9eb3b /t/t5523-push-upstream.sh
parente674c17db25750f14c1dd1d8f588eb3135b5cea9 (diff)
downloadgit-2d59ced10418f60914f353031215ecc6adcef204.zip
git-2d59ced10418f60914f353031215ecc6adcef204.tar.gz
git-2d59ced10418f60914f353031215ecc6adcef204.tar.bz2
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>
Diffstat (limited to 't/t5523-push-upstream.sh')
-rwxr-xr-xt/t5523-push-upstream.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/t/t5523-push-upstream.sh b/t/t5523-push-upstream.sh
index 00da707..5a18533 100755
--- a/t/t5523-push-upstream.sh
+++ b/t/t5523-push-upstream.sh
@@ -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
'