summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorDavid Turner <dturner@twopensource.com>2016-04-15 15:19:09 -0400
committerJunio C Hamano <gitster@pobox.com>2016-04-18 11:46:05 -0700
commit771dcaaee911d3cf2460a750e60ce611950d027e (patch)
treefda7ebbe114974f5bb0a114fa239219642d112c4 /t
parentfa16ec8aaa3247e8bd271b1728f6b59df1649194 (diff)
downloadgit-dt/http-fetch-limit-advertisement.tar.gz
clone: send refspec for single-branch clonesdt/http-fetch-limit-advertisement
For single-branch clones (when we know in advance what the remote branch name will be), send a refspec so that the server doesn't tell us about any other refs. Signed-off-by: David Turner <dturner@twopensource.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t5552-http-fetch-branch.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/t/t5552-http-fetch-branch.sh b/t/t5552-http-fetch-branch.sh
index 0e905d90b7..8a8e218c1d 100755
--- a/t/t5552-http-fetch-branch.sh
+++ b/t/t5552-http-fetch-branch.sh
@@ -38,5 +38,10 @@ test_expect_success 'fetch with refspec only fetches requested branch' '
)
'
+test_expect_success 'single-branch clone only fetches requested branch' '
+ GIT_TRACE_PACKET="$TRASH_DIRECTORY/trace" git clone --single-branch -b master $HTTPD_URL/smart/repo.git sbc &&
+ ! grep "refs/heads/another_branch" trace
+'
+
stop_httpd
test_done