summaryrefslogtreecommitdiff
path: root/t/t5801-remote-helpers.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-07-09 15:25:34 -0700
committerJunio C Hamano <gitster@pobox.com>2019-07-09 15:25:34 -0700
commitdbf491e9e947141eab7ffce65d6c97c121def6e0 (patch)
tree29a8054133cdef2ffc1df2b07ff4e6cdce616fcf /t/t5801-remote-helpers.sh
parentecf55ae4f0f73a9759eb58e01cfcc6758acc07c2 (diff)
parentf80d922355302abf07bf0cf9a2135c2eaa61f502 (diff)
downloadgit-dbf491e9e947141eab7ffce65d6c97c121def6e0.tar.gz
Merge branch 'fc/fetch-with-import-fix'
Code restructuring during 2.20 period broke fetching tags via "import" based transports. * fc/fetch-with-import-fix: fetch: fix regression with transport helpers fetch: make the code more understandable fetch: trivial cleanup t5801 (remote-helpers): add test to fetch tags t5801 (remote-helpers): cleanup refspec stuff
Diffstat (limited to 't/t5801-remote-helpers.sh')
-rwxr-xr-xt/t5801-remote-helpers.sh18
1 files changed, 14 insertions, 4 deletions
diff --git a/t/t5801-remote-helpers.sh b/t/t5801-remote-helpers.sh
index d04f8007e0..2d6c4a281e 100755
--- a/t/t5801-remote-helpers.sh
+++ b/t/t5801-remote-helpers.sh
@@ -126,7 +126,7 @@ test_expect_success 'forced push' '
'
test_expect_success 'cloning without refspec' '
- GIT_REMOTE_TESTGIT_REFSPEC="" \
+ GIT_REMOTE_TESTGIT_NOREFSPEC=1 \
git clone "testgit::${PWD}/server" local2 2>error &&
test_i18ngrep "this remote helper should implement refspec capability" error &&
compare_refs local2 HEAD server HEAD
@@ -135,7 +135,7 @@ test_expect_success 'cloning without refspec' '
test_expect_success 'pulling without refspecs' '
(cd local2 &&
git reset --hard &&
- GIT_REMOTE_TESTGIT_REFSPEC="" git pull 2>../error) &&
+ GIT_REMOTE_TESTGIT_NOREFSPEC=1 git pull 2>../error) &&
test_i18ngrep "this remote helper should implement refspec capability" error &&
compare_refs local2 HEAD server HEAD
'
@@ -145,8 +145,8 @@ test_expect_success 'pushing without refspecs' '
(cd local2 &&
echo content >>file &&
git commit -a -m ten &&
- GIT_REMOTE_TESTGIT_REFSPEC="" &&
- export GIT_REMOTE_TESTGIT_REFSPEC &&
+ GIT_REMOTE_TESTGIT_NOREFSPEC=1 &&
+ export GIT_REMOTE_TESTGIT_NOREFSPEC &&
test_must_fail git push 2>../error) &&
test_i18ngrep "remote-helper doesn.t support push; refspec needed" error
'
@@ -303,4 +303,14 @@ test_expect_success 'fetch url' '
compare_refs server HEAD local FETCH_HEAD
'
+test_expect_success 'fetch tag' '
+ (cd server &&
+ git tag v1.0
+ ) &&
+ (cd local &&
+ git fetch
+ ) &&
+ compare_refs local v1.0 server v1.0
+'
+
test_done