Skip to content

Commit 35a2f21

Browse files
committed
fixup! pack-objects: introduce GIT_TEST_PACK_PATH_WALK
Signed-off-by: Derrick Stolee <[email protected]>
1 parent 3dcbb2e commit 35a2f21

10 files changed

+7
-59
lines changed

builtin/pack-objects.c

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ static int delta_search_threads;
221221
static int pack_to_stdout;
222222
static int sparse;
223223
static int thin;
224-
static int path_walk = -1;
224+
static int path_walk;
225225
static int num_preferred_base;
226226
static struct progress *progress_state;
227227

@@ -4310,7 +4310,7 @@ static int add_objects_by_path(const char *path,
43104310
struct object_id *oid = &oids->oid[i];
43114311

43124312
/* Skip objects that do not exist locally. */
4313-
if ((exclude_promisor_objects || arg_missing_action != MA_ERROR) &&
4313+
if (exclude_promisor_objects &&
43144314
oid_object_info_extended(the_repository, oid, &oi,
43154315
OBJECT_INFO_FOR_PREFETCH) < 0)
43164316
continue;
@@ -4728,14 +4728,6 @@ int cmd_pack_objects(int argc,
47284728
if (pack_to_stdout != !base_name || argc)
47294729
usage_with_options(pack_usage, pack_objects_options);
47304730

4731-
if (path_walk < 0) {
4732-
if (use_bitmap_index > 0 ||
4733-
!use_internal_rev_list)
4734-
path_walk = 0;
4735-
else
4736-
path_walk = git_env_bool("GIT_TEST_PACK_PATH_WALK", 0);
4737-
}
4738-
47394731
if (depth < 0)
47404732
depth = 0;
47414733
if (depth >= (1 << OE_DEPTH_BITS)) {

ci/run-build-and-tests.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ linux-TEST-vars)
2626
export GIT_TEST_NO_WRITE_REV_INDEX=1
2727
export GIT_TEST_CHECKOUT_WORKERS=2
2828
export GIT_TEST_PACK_USE_BITMAP_BOUNDARY_TRAVERSAL=1
29-
export GIT_TEST_PACK_PATH_WALK=1
3029
;;
3130
linux-clang)
3231
export GIT_TEST_DEFAULT_HASH=sha1

t/README

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -415,10 +415,6 @@ GIT_TEST_PACK_SPARSE=<boolean> if disabled will default the pack-objects
415415
builtin to use the non-sparse object walk. This can still be overridden by
416416
the --sparse command-line argument.
417417

418-
GIT_TEST_PACK_PATH_WALK=<boolean> if enabled will default the pack-objects
419-
builtin to use the path-walk API for the object walk. This can still be
420-
overridden by the --no-path-walk command-line argument.
421-
422418
GIT_TEST_PRELOAD_INDEX=<boolean> exercises the preload-index code path
423419
by overriding the minimum number of cache entries required per thread.
424420

t/t0411-clone-from-partial.sh

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,6 @@ test_expect_success 'pack-objects should fetch from promisor remote and execute
5959

6060
test_expect_success 'clone from promisor remote does not lazy-fetch by default' '
6161
rm -f script-executed &&
62-
63-
# The --path-walk feature of "git pack-objects" is not
64-
# compatible with this kind of fetch from an incomplete repo.
65-
GIT_TEST_PACK_PATH_WALK=0 &&
66-
export GIT_TEST_PACK_PATH_WALK &&
67-
6862
test_must_fail git clone evil no-lazy 2>err &&
6963
test_grep "lazy fetching disabled" err &&
7064
test_path_is_missing script-executed

t/t5306-pack-nobase.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,6 @@ test_expect_success 'indirectly clone patch_clone' '
5959
git pull ../.git &&
6060
test $(git rev-parse HEAD) = $B &&
6161
62-
# The --path-walk feature of "git pack-objects" is not
63-
# compatible with this kind of fetch from an incomplete repo.
64-
GIT_TEST_PACK_PATH_WALK=0 &&
65-
export GIT_TEST_PACK_PATH_WALK &&
66-
6762
git pull ../patch_clone/.git &&
6863
test $(git rev-parse HEAD) = $C
6964
)

t/t5310-pack-bitmaps.sh

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,8 @@ test_bitmap_cases () {
158158
ls .git/objects/pack/ | grep bitmap >output &&
159159
test_line_count = 1 output &&
160160
# verify equivalent packs are generated with/without using bitmap index
161-
# Be careful to not use the path-walk option in either case.
162-
packasha1=$(git pack-objects --no-use-bitmap-index --no-path-walk --all packa </dev/null) &&
163-
packbsha1=$(git pack-objects --use-bitmap-index --no-path-walk --all packb </dev/null) &&
161+
packasha1=$(git pack-objects --no-use-bitmap-index --all packa </dev/null) &&
162+
packbsha1=$(git pack-objects --use-bitmap-index --all packb </dev/null) &&
164163
list_packed_objects packa-$packasha1.idx >packa.objects &&
165164
list_packed_objects packb-$packbsha1.idx >packb.objects &&
166165
test_cmp packa.objects packb.objects
@@ -389,14 +388,6 @@ test_bitmap_cases () {
389388
git init --bare client.git &&
390389
(
391390
cd client.git &&
392-
393-
# This test relies on reusing a delta, but if the
394-
# path-walk machinery is engaged, the base object
395-
# is considered too small to use during the
396-
# dynamic computation, so is not used.
397-
GIT_TEST_PACK_PATH_WALK=0 &&
398-
export GIT_TEST_PACK_PATH_WALK &&
399-
400391
git config transfer.unpackLimit 1 &&
401392
git fetch .. delta-reuse-old:delta-reuse-old &&
402393
git fetch .. delta-reuse-new:delta-reuse-new &&

t/t5316-pack-delta-depth.sh

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,18 +89,15 @@ max_chain() {
8989
# adjusted (or scrapped if the heuristics have become too unreliable)
9090
test_expect_success 'packing produces a long delta' '
9191
# Use --window=0 to make sure we are seeing reused deltas,
92-
# not computing a new long chain. (Also avoid the --path-walk
93-
# option as it may break delta chains.)
94-
pack=$(git pack-objects --all --window=0 --no-path-walk </dev/null pack) &&
92+
# not computing a new long chain.
93+
pack=$(git pack-objects --all --window=0 </dev/null pack) &&
9594
echo 9 >expect &&
9695
max_chain pack-$pack.pack >actual &&
9796
test_cmp expect actual
9897
'
9998

10099
test_expect_success '--depth limits depth' '
101-
# Avoid --path-walk to avoid breaking delta chains across path
102-
# boundaries.
103-
pack=$(git pack-objects --all --depth=5 --no-path-walk </dev/null pack) &&
100+
pack=$(git pack-objects --all --depth=5 </dev/null pack) &&
104101
echo 5 >expect &&
105102
max_chain pack-$pack.pack >actual &&
106103
test_cmp expect actual

t/t5332-multi-pack-reuse.sh

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,6 @@ test_description='pack-objects multi-pack reuse'
77

88
GIT_TEST_MULTI_PACK_INDEX=0
99
GIT_TEST_MULTI_PACK_INDEX_WRITE_INCREMENTAL=0
10-
11-
# The --path-walk option does not consider the preferred pack
12-
# at all for reusing deltas, so this variable changes the
13-
# behavior of this test, if enabled.
14-
GIT_TEST_PACK_PATH_WALK=0
15-
export GIT_TEST_PACK_PATH_WALK
16-
1710
objdir=.git/objects
1811
packdir=$objdir/pack
1912

t/t5530-upload-pack-error.sh

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,6 @@ test_expect_success 'upload-pack fails due to error in pack-objects packing' '
3434
hexsz=$(test_oid hexsz) &&
3535
printf "%04xwant %s\n00000009done\n0000" \
3636
$(($hexsz + 10)) $head >input &&
37-
38-
# The current implementation of path-walk causes a different
39-
# error message. This will be changed by a future refactoring.
40-
GIT_TEST_PACK_PATH_WALK=0 &&
41-
export GIT_TEST_PACK_PATH_WALK &&
42-
4337
test_must_fail git upload-pack . <input >/dev/null 2>output.err &&
4438
test_grep "unable to read" output.err &&
4539
test_grep "pack-objects died" output.err

t/t7406-submodule-update.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1103,16 +1103,13 @@ test_expect_success 'submodule update --quiet passes quietness to fetch with a s
11031103
git clone super4 super5 &&
11041104
(cd super5 &&
11051105
# This test var can mess with the stderr output checked in this test.
1106-
GIT_TEST_PACK_PATH_WALK=0 \
11071106
GIT_TEST_NAME_HASH_VERSION=1 \
11081107
git submodule update --quiet --init --depth=1 submodule3 >out 2>err &&
11091108
test_must_be_empty out &&
11101109
test_must_be_empty err
11111110
) &&
11121111
git clone super4 super6 &&
11131112
(cd super6 &&
1114-
# This test variable will create a "warning" message to stderr
1115-
GIT_TEST_PACK_PATH_WALK=0 \
11161113
git submodule update --init --depth=1 submodule3 >out 2>err &&
11171114
test_file_not_empty out &&
11181115
test_file_not_empty err

0 commit comments

Comments
 (0)