revert(3p/git): Revert merge of git upstream at v2.26.2
This causes cgit to serve error pages, which is undesirable. This reverts commit5229c9b232, reversing changes made tof2b211131f.
This commit is contained in:
parent
6f8fbf4aa4
commit
93ba78d6f4
1006 changed files with 60537 additions and 148724 deletions
93
third_party/git/t/t0410-partial-clone.sh
vendored
93
third_party/git/t/t0410-partial-clone.sh
vendored
|
|
@ -26,7 +26,7 @@ promise_and_delete () {
|
|||
test_expect_success 'extensions.partialclone without filter' '
|
||||
test_create_repo server &&
|
||||
git clone --filter="blob:none" "file://$(pwd)/server" client &&
|
||||
git -C client config --unset remote.origin.partialclonefilter &&
|
||||
git -C client config --unset core.partialclonefilter &&
|
||||
git -C client fetch origin
|
||||
'
|
||||
|
||||
|
|
@ -166,9 +166,8 @@ test_expect_success 'fetching of missing objects' '
|
|||
# associated packfile contains the object
|
||||
ls repo/.git/objects/pack/pack-*.promisor >promisorlist &&
|
||||
test_line_count = 1 promisorlist &&
|
||||
IDX=$(sed "s/promisor$/idx/" promisorlist) &&
|
||||
git verify-pack --verbose "$IDX" >out &&
|
||||
grep "$HASH" out
|
||||
IDX=$(cat promisorlist | sed "s/promisor$/idx/") &&
|
||||
git verify-pack --verbose "$IDX" | grep "$HASH"
|
||||
'
|
||||
|
||||
test_expect_success 'fetching of missing objects works with ref-in-want enabled' '
|
||||
|
|
@ -183,55 +182,8 @@ test_expect_success 'fetching of missing objects works with ref-in-want enabled'
|
|||
grep "git< fetch=.*ref-in-want" trace
|
||||
'
|
||||
|
||||
test_expect_success 'fetching of missing objects from another promisor remote' '
|
||||
git clone "file://$(pwd)/server" server2 &&
|
||||
test_commit -C server2 bar &&
|
||||
git -C server2 repack -a -d --write-bitmap-index &&
|
||||
HASH2=$(git -C server2 rev-parse bar) &&
|
||||
|
||||
git -C repo remote add server2 "file://$(pwd)/server2" &&
|
||||
git -C repo config remote.server2.promisor true &&
|
||||
git -C repo cat-file -p "$HASH2" &&
|
||||
|
||||
git -C repo fetch server2 &&
|
||||
rm -rf repo/.git/objects/* &&
|
||||
git -C repo cat-file -p "$HASH2" &&
|
||||
|
||||
# Ensure that the .promisor file is written, and check that its
|
||||
# associated packfile contains the object
|
||||
ls repo/.git/objects/pack/pack-*.promisor >promisorlist &&
|
||||
test_line_count = 1 promisorlist &&
|
||||
IDX=$(sed "s/promisor$/idx/" promisorlist) &&
|
||||
git verify-pack --verbose "$IDX" >out &&
|
||||
grep "$HASH2" out
|
||||
'
|
||||
|
||||
test_expect_success 'fetching of missing objects configures a promisor remote' '
|
||||
git clone "file://$(pwd)/server" server3 &&
|
||||
test_commit -C server3 baz &&
|
||||
git -C server3 repack -a -d --write-bitmap-index &&
|
||||
HASH3=$(git -C server3 rev-parse baz) &&
|
||||
git -C server3 config uploadpack.allowfilter 1 &&
|
||||
|
||||
rm repo/.git/objects/pack/pack-*.promisor &&
|
||||
|
||||
git -C repo remote add server3 "file://$(pwd)/server3" &&
|
||||
git -C repo fetch --filter="blob:none" server3 $HASH3 &&
|
||||
|
||||
test_cmp_config -C repo true remote.server3.promisor &&
|
||||
|
||||
# Ensure that the .promisor file is written, and check that its
|
||||
# associated packfile contains the object
|
||||
ls repo/.git/objects/pack/pack-*.promisor >promisorlist &&
|
||||
test_line_count = 1 promisorlist &&
|
||||
IDX=$(sed "s/promisor$/idx/" promisorlist) &&
|
||||
git verify-pack --verbose "$IDX" >out &&
|
||||
grep "$HASH3" out
|
||||
'
|
||||
|
||||
test_expect_success 'fetching of missing blobs works' '
|
||||
rm -rf server server2 repo &&
|
||||
rm -rf server server3 repo &&
|
||||
rm -rf server repo &&
|
||||
test_create_repo server &&
|
||||
test_commit -C server foo &&
|
||||
git -C server repack -a -d --write-bitmap-index &&
|
||||
|
|
@ -282,7 +234,7 @@ test_expect_success 'rev-list stops traversal at missing and promised commit' '
|
|||
|
||||
git -C repo config core.repositoryformatversion 1 &&
|
||||
git -C repo config extensions.partialclone "arbitrary string" &&
|
||||
GIT_TEST_COMMIT_GRAPH=0 git -C repo -c core.commitGraph=false rev-list --exclude-promisor-objects --objects bar >out &&
|
||||
GIT_TEST_COMMIT_GRAPH=0 git -C repo rev-list --exclude-promisor-objects --objects bar >out &&
|
||||
grep $(git -C repo rev-parse bar) out &&
|
||||
! grep $FOO out
|
||||
'
|
||||
|
|
@ -429,19 +381,6 @@ test_expect_success 'rev-list dies for missing objects on cmd line' '
|
|||
done
|
||||
'
|
||||
|
||||
test_expect_success 'single promisor remote can be re-initialized gracefully' '
|
||||
# ensure one promisor is in the promisors list
|
||||
rm -rf repo &&
|
||||
test_create_repo repo &&
|
||||
test_create_repo other &&
|
||||
git -C repo remote add foo "file://$(pwd)/other" &&
|
||||
git -C repo config remote.foo.promisor true &&
|
||||
git -C repo config extensions.partialclone foo &&
|
||||
|
||||
# reinitialize the promisors list
|
||||
git -C repo fetch --filter=blob:none foo
|
||||
'
|
||||
|
||||
test_expect_success 'gc repacks promisor objects separately from non-promisor objects' '
|
||||
rm -rf repo &&
|
||||
test_create_repo repo &&
|
||||
|
|
@ -553,20 +492,6 @@ test_expect_success 'gc stops traversal when a missing but promised object is re
|
|||
! grep "$TREE_HASH" out
|
||||
'
|
||||
|
||||
test_expect_success 'do not fetch when checking existence of tree we construct ourselves' '
|
||||
rm -rf repo &&
|
||||
test_create_repo repo &&
|
||||
test_commit -C repo base &&
|
||||
test_commit -C repo side1 &&
|
||||
git -C repo checkout base &&
|
||||
test_commit -C repo side2 &&
|
||||
|
||||
git -C repo config core.repositoryformatversion 1 &&
|
||||
git -C repo config extensions.partialclone "arbitrary string" &&
|
||||
|
||||
git -C repo cherry-pick side1
|
||||
'
|
||||
|
||||
. "$TEST_DIRECTORY"/lib-httpd.sh
|
||||
start_httpd
|
||||
|
||||
|
|
@ -589,12 +514,8 @@ test_expect_success 'fetching of missing objects from an HTTP server' '
|
|||
# associated packfile contains the object
|
||||
ls repo/.git/objects/pack/pack-*.promisor >promisorlist &&
|
||||
test_line_count = 1 promisorlist &&
|
||||
IDX=$(sed "s/promisor$/idx/" promisorlist) &&
|
||||
git verify-pack --verbose "$IDX" >out &&
|
||||
grep "$HASH" out
|
||||
IDX=$(cat promisorlist | sed "s/promisor$/idx/") &&
|
||||
git verify-pack --verbose "$IDX" | grep "$HASH"
|
||||
'
|
||||
|
||||
# DO NOT add non-httpd-specific tests here, because the last part of this
|
||||
# test script is only executed when httpd is available and enabled.
|
||||
|
||||
test_done
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue