diff options
author | Jiang Xin <worldhello.net@gmail.com> | 2021-08-03 17:03:35 +0800 |
---|---|---|
committer | Jiang Xin <worldhello.net@gmail.com> | 2021-08-03 17:03:35 +0800 |
commit | 972c9cf6aed660f3b4189a8f2adda505e67110ff (patch) | |
tree | 350bb2a29eb3360cdf36a30d8c8e7c76c3e61851 /t/t1022-read-tree-partial-clone.sh | |
parent | l10n: fixed typos of mismatched constant strings (diff) | |
parent | Git 2.33-rc0 (diff) | |
download | tgif-972c9cf6aed660f3b4189a8f2adda505e67110ff.tar.xz |
Merge branch 'master' of github.com:git/git
* 'master' of github.com:git/git: (397 commits)
Git 2.33-rc0
The seventh batch
ci/install-dependencies: handle "sparse" job package installs
ci: run "apt-get update" before "apt-get install"
cache-tree: prefetch in partial clone read-tree
unpack-trees: refactor prefetching code
pack-bitmap: check pack validity when opening bitmap
bundle tests: use test_cmp instead of grep
bundle tests: use ">file" not ": >file"
The sixth batch
doc: pull: fix rebase=false documentation
pack-bitmap: clarify comment in filter_bitmap_exclude_type()
doc: clarify description of 'submodule.recurse'
doc/git-config: simplify "override" advice for FILES section
doc/git-config: clarify GIT_CONFIG environment variable
doc/git-config: explain --file instead of referring to GIT_CONFIG
t0000: fix test if run with TEST_OUTPUT_DIRECTORY
multi-pack-index: fix potential segfault without sub-command
refs/debug: quote prefix
t0000: clear GIT_SKIP_TESTS before running sub-tests
...
Diffstat (limited to 't/t1022-read-tree-partial-clone.sh')
-rwxr-xr-x | t/t1022-read-tree-partial-clone.sh | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/t/t1022-read-tree-partial-clone.sh b/t/t1022-read-tree-partial-clone.sh new file mode 100755 index 0000000000..a763e27c7d --- /dev/null +++ b/t/t1022-read-tree-partial-clone.sh @@ -0,0 +1,33 @@ +#!/bin/sh + +test_description='git read-tree in partial clones' + +TEST_NO_CREATE_REPO=1 + +GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main +export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME + +. ./test-lib.sh + +test_expect_success 'read-tree in partial clone prefetches in one batch' ' + test_when_finished "rm -rf server client trace" && + + git init server && + echo foo >server/one && + echo bar >server/two && + git -C server add one two && + git -C server commit -m "initial commit" && + TREE=$(git -C server rev-parse HEAD^{tree}) && + + git -C server config uploadpack.allowfilter 1 && + git -C server config uploadpack.allowanysha1inwant 1 && + git clone --bare --filter=blob:none "file://$(pwd)/server" client && + GIT_TRACE_PACKET="$(pwd)/trace" git -C client read-tree $TREE && + + # "done" marks the end of negotiation (once per fetch). Expect that + # only one fetch occurs. + grep "fetch> done" trace >donelines && + test_line_count = 1 donelines +' + +test_done |