git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
7d8aeb7667e45ff7a69489d6fb2c266a33ff8357 blob 894 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
 
#!/bin/sh

test_description='test git wire-protocol version 2'

TEST_NO_CREATE_REPO=1

. ./test-lib.sh

# Test protocol v2 with 'file://' transport
#
test_expect_success 'create repo to be served by file:// transport' '
	git init file_parent &&
	test_commit -C file_parent one
'

test_expect_success 'list refs with file:// using protocol v2' '
	GIT_TRACE_PACKET=1 git -c protocol.version=2 \
		ls-remote --symref "file://$(pwd)/file_parent" >actual 2>log &&

	# Server responded using protocol v2
	cat log &&
	grep "git< version 2" log &&

	git ls-remote --symref "file://$(pwd)/file_parent" >expect &&
	test_cmp actual expect
'

test_expect_success 'ref advertisment is filtered with ls-remote using protocol v2' '
	GIT_TRACE_PACKET=1 git -c protocol.version=2 \
		ls-remote "file://$(pwd)/file_parent" master 2>log &&

	grep "ref-pattern master" log &&
	! grep "refs/tags/" log
'

test_done
debug log:

solving 7d8aeb766 ...
found 7d8aeb766 in https://public-inbox.org/git/20180103001828.205012-17-bmwill@google.com/
found 4bf4d61ac in https://public-inbox.org/git/20171204235823.63299-14-bmwill@google.com/ ||
	https://public-inbox.org/git/20180103001828.205012-14-bmwill@google.com/

applying [1/3] https://public-inbox.org/git/20171204235823.63299-14-bmwill@google.com/
diff --git a/t/t5701-protocol-v2.sh b/t/t5701-protocol-v2.sh
new file mode 100755
index 000000000..4bf4d61ac

Checking patch t/t5701-protocol-v2.sh...
Applied patch t/t5701-protocol-v2.sh cleanly.

skipping https://public-inbox.org/git/20180103001828.205012-14-bmwill@google.com/ for 4bf4d61ac
index at:
100755 4bf4d61aca5646d262b449ae0b6a5ac483103847	t/t5701-protocol-v2.sh

applying [2/3] https://public-inbox.org/git/20180103001828.205012-17-bmwill@google.com/
diff --git a/t/t5701-protocol-v2.sh b/t/t5701-protocol-v2.sh
index 4bf4d61ac..7d8aeb766 100755

Checking patch t/t5701-protocol-v2.sh...
Applied patch t/t5701-protocol-v2.sh cleanly.

index at:
100755 7d8aeb7667e45ff7a69489d6fb2c266a33ff8357	t/t5701-protocol-v2.sh

Code repositories for project(s) associated with this inbox:

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).