Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrandon Williams <bmwill@google.com>2018-04-24 01:46:22 +0300
committerJunio C Hamano <gitster@pobox.com>2018-04-24 05:24:40 +0300
commitecc3e5342de203fa2d84c4a49a46aaa87289534b (patch)
treed45eb1da65af81dc7fbbf4613e39a7fadfc8b6d7 /t/t5701-git-serve.sh
parentbbc39d4020372a0bf8aa399c7550ba58312adfa1 (diff)
serve: introduce the server-option capability
Introduce the "server-option" capability to protocol version 2. This enables future clients the ability to send server specific options in command requests when using protocol version 2. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5701-git-serve.sh')
-rwxr-xr-xt/t5701-git-serve.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/t/t5701-git-serve.sh b/t/t5701-git-serve.sh
index 72d7bc5628..011a5796db 100755
--- a/t/t5701-git-serve.sh
+++ b/t/t5701-git-serve.sh
@@ -10,6 +10,7 @@ test_expect_success 'test capability advertisement' '
agent=git/$(git version | cut -d" " -f3)
ls-refs
fetch=shallow
+ server-option
0000
EOF
@@ -173,4 +174,24 @@ test_expect_success 'symrefs parameter' '
test_cmp actual expect
'
+test_expect_success 'sending server-options' '
+ test-pkt-line pack >in <<-EOF &&
+ command=ls-refs
+ server-option=hello
+ server-option=world
+ 0001
+ ref-prefix HEAD
+ 0000
+ EOF
+
+ cat >expect <<-EOF &&
+ $(git rev-parse HEAD) HEAD
+ 0000
+ EOF
+
+ git serve --stateless-rpc <in >out &&
+ test-pkt-line unpack <out >actual &&
+ test_cmp actual expect
+'
+
test_done