merge(3p/git): Merge git subtree at v2.29.2
This also bumps the stable nixpkgs to 20.09 as of 2020-11-21, because there is some breakage in the git build related to the netrc credentials helper which someone has taken care of in nixpkgs. The stable channel is not used for anything other than git, so this should be fine. Change-Id: I3575a19dab09e1e9556cf8231d717de9890484fb
This commit is contained in:
parent
082c006c04
commit
f4609b896f
1485 changed files with 241535 additions and 109418 deletions
25
third_party/git/t/t5701-git-serve.sh
vendored
25
third_party/git/t/t5701-git-serve.sh
vendored
|
|
@ -5,12 +5,17 @@ test_description='test protocol v2 server commands'
|
|||
. ./test-lib.sh
|
||||
|
||||
test_expect_success 'test capability advertisement' '
|
||||
test_oid_cache <<-EOF &&
|
||||
wrong_algo sha1:sha256
|
||||
wrong_algo sha256:sha1
|
||||
EOF
|
||||
cat >expect <<-EOF &&
|
||||
version 2
|
||||
agent=git/$(git version | cut -d" " -f3)
|
||||
ls-refs
|
||||
fetch=shallow
|
||||
server-option
|
||||
object-format=$(test_oid algo)
|
||||
0000
|
||||
EOF
|
||||
|
||||
|
|
@ -45,6 +50,7 @@ test_expect_success 'request invalid capability' '
|
|||
test_expect_success 'request with no command' '
|
||||
test-tool pkt-line pack >in <<-EOF &&
|
||||
agent=git/test
|
||||
object-format=$(test_oid algo)
|
||||
0000
|
||||
EOF
|
||||
test_must_fail test-tool serve-v2 --stateless-rpc 2>err <in &&
|
||||
|
|
@ -54,6 +60,7 @@ test_expect_success 'request with no command' '
|
|||
test_expect_success 'request invalid command' '
|
||||
test-tool pkt-line pack >in <<-EOF &&
|
||||
command=foo
|
||||
object-format=$(test_oid algo)
|
||||
agent=git/test
|
||||
0000
|
||||
EOF
|
||||
|
|
@ -61,6 +68,17 @@ test_expect_success 'request invalid command' '
|
|||
test_i18ngrep "invalid command" err
|
||||
'
|
||||
|
||||
test_expect_success 'wrong object-format' '
|
||||
test-tool pkt-line pack >in <<-EOF &&
|
||||
command=fetch
|
||||
agent=git/test
|
||||
object-format=$(test_oid wrong_algo)
|
||||
0000
|
||||
EOF
|
||||
test_must_fail test-tool serve-v2 --stateless-rpc 2>err <in &&
|
||||
test_i18ngrep "mismatched object format" err
|
||||
'
|
||||
|
||||
# Test the basics of ls-refs
|
||||
#
|
||||
test_expect_success 'setup some refs and tags' '
|
||||
|
|
@ -74,6 +92,7 @@ test_expect_success 'setup some refs and tags' '
|
|||
test_expect_success 'basics of ls-refs' '
|
||||
test-tool pkt-line pack >in <<-EOF &&
|
||||
command=ls-refs
|
||||
object-format=$(test_oid algo)
|
||||
0000
|
||||
EOF
|
||||
|
||||
|
|
@ -96,6 +115,7 @@ test_expect_success 'basics of ls-refs' '
|
|||
test_expect_success 'basic ref-prefixes' '
|
||||
test-tool pkt-line pack >in <<-EOF &&
|
||||
command=ls-refs
|
||||
object-format=$(test_oid algo)
|
||||
0001
|
||||
ref-prefix refs/heads/master
|
||||
ref-prefix refs/tags/one
|
||||
|
|
@ -116,6 +136,7 @@ test_expect_success 'basic ref-prefixes' '
|
|||
test_expect_success 'refs/heads prefix' '
|
||||
test-tool pkt-line pack >in <<-EOF &&
|
||||
command=ls-refs
|
||||
object-format=$(test_oid algo)
|
||||
0001
|
||||
ref-prefix refs/heads/
|
||||
0000
|
||||
|
|
@ -136,6 +157,7 @@ test_expect_success 'refs/heads prefix' '
|
|||
test_expect_success 'peel parameter' '
|
||||
test-tool pkt-line pack >in <<-EOF &&
|
||||
command=ls-refs
|
||||
object-format=$(test_oid algo)
|
||||
0001
|
||||
peel
|
||||
ref-prefix refs/tags/
|
||||
|
|
@ -157,6 +179,7 @@ test_expect_success 'peel parameter' '
|
|||
test_expect_success 'symrefs parameter' '
|
||||
test-tool pkt-line pack >in <<-EOF &&
|
||||
command=ls-refs
|
||||
object-format=$(test_oid algo)
|
||||
0001
|
||||
symrefs
|
||||
ref-prefix refs/heads/
|
||||
|
|
@ -178,6 +201,7 @@ test_expect_success 'symrefs parameter' '
|
|||
test_expect_success 'sending server-options' '
|
||||
test-tool pkt-line pack >in <<-EOF &&
|
||||
command=ls-refs
|
||||
object-format=$(test_oid algo)
|
||||
server-option=hello
|
||||
server-option=world
|
||||
0001
|
||||
|
|
@ -200,6 +224,7 @@ test_expect_success 'unexpected lines are not allowed in fetch request' '
|
|||
|
||||
test-tool pkt-line pack >in <<-EOF &&
|
||||
command=fetch
|
||||
object-format=$(test_oid algo)
|
||||
0001
|
||||
this-is-not-a-command
|
||||
0000
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue