File tree Expand file tree Collapse file tree 6 files changed +23
-11
lines changed Expand file tree Collapse file tree 6 files changed +23
-11
lines changed Original file line number Diff line number Diff line change @@ -710,8 +710,9 @@ test_expect_success 'expire respects .keep files' '
710
710
PACKA=$(ls .git/objects/pack/a-pack*\.pack | sed s/\.pack\$//) &&
711
711
touch $PACKA.keep &&
712
712
git multi-pack-index expire &&
713
- ls -S .git/objects/pack/a-pack* | grep $PACKA >a-pack-files &&
714
- test_line_count = 3 a-pack-files &&
713
+ test_path_is_file $PACKA.idx &&
714
+ test_path_is_file $PACKA.keep &&
715
+ test_path_is_file $PACKA.pack &&
715
716
test-tool read-midx .git/objects | grep idx >midx-list &&
716
717
test_line_count = 2 midx-list
717
718
)
Original file line number Diff line number Diff line change 3
3
test_description=' on-disk reverse index'
4
4
. ./test-lib.sh
5
5
6
+ # The below tests want control over the 'pack.writeReverseIndex' setting
7
+ # themselves to assert various combinations of it with other options.
8
+ sane_unset GIT_TEST_WRITE_REV_INDEX
9
+
6
10
packdir=.git/objects/pack
7
11
8
12
test_expect_success ' setup' '
Original file line number Diff line number Diff line change @@ -329,7 +329,7 @@ test_expect_success SYMLINKS 'clone repo with symlinked or unknown files at obje
329
329
for raw in $(ls T*.raw)
330
330
do
331
331
sed -e "s!/../!/Y/!; s![0-9a-f]\{38,\}!Z!" -e "/commit-graph/d" \
332
- -e "/multi-pack-index/d" <$raw >$raw.de-sha-1 &&
332
+ -e "/multi-pack-index/d" -e "/rev/d" <$raw >$raw.de-sha-1 &&
333
333
sort $raw.de-sha-1 >$raw.de-sha || return 1
334
334
done &&
335
335
Original file line number Diff line number Diff line change @@ -851,8 +851,10 @@ test_expect_success 'part of packfile response provided as URI' '
851
851
test -f h2found &&
852
852
853
853
# Ensure that there are exactly 6 files (3 .pack and 3 .idx).
854
- ls http_child/.git/objects/pack/* >filelist &&
855
- test_line_count = 6 filelist
854
+ ls http_child/.git/objects/pack/*.pack >packlist &&
855
+ ls http_child/.git/objects/pack/*.idx >idxlist &&
856
+ test_line_count = 3 idxlist &&
857
+ test_line_count = 3 packlist
856
858
'
857
859
858
860
test_expect_success ' fetching with valid packfile URI but invalid hash fails' '
@@ -905,8 +907,10 @@ test_expect_success 'packfile-uri with transfer.fsckobjects' '
905
907
clone "$HTTPD_URL/smart/http_parent" http_child &&
906
908
907
909
# Ensure that there are exactly 4 files (2 .pack and 2 .idx).
908
- ls http_child/.git/objects/pack/* >filelist &&
909
- test_line_count = 4 filelist
910
+ ls http_child/.git/objects/pack/*.pack >packlist &&
911
+ ls http_child/.git/objects/pack/*.idx >idxlist &&
912
+ test_line_count = 2 idxlist &&
913
+ test_line_count = 2 packlist
910
914
'
911
915
912
916
test_expect_success ' packfile-uri with transfer.fsckobjects fails on bad object' '
Original file line number Diff line number Diff line change @@ -106,17 +106,17 @@ test_expect_success 'auto gc with too many loose objects does not attempt to cre
106
106
test_commit "$(test_oid obj2)" &&
107
107
# Our first gc will create a pack; our second will create a second pack
108
108
git gc --auto &&
109
- ls .git/objects/pack | sort >existing_packs &&
109
+ ls .git/objects/pack/pack-*.pack | sort >existing_packs &&
110
110
test_commit "$(test_oid obj3)" &&
111
111
test_commit "$(test_oid obj4)" &&
112
112
113
113
git gc --auto 2>err &&
114
114
test_i18ngrep ! "^warning:" err &&
115
- ls .git/objects/pack/ | sort >post_packs &&
115
+ ls .git/objects/pack/pack-*.pack | sort >post_packs &&
116
116
comm -1 -3 existing_packs post_packs >new &&
117
117
comm -2 -3 existing_packs post_packs >del &&
118
118
test_line_count = 0 del && # No packs are deleted
119
- test_line_count = 2 new # There is one new pack and its .idx
119
+ test_line_count = 1 new # There is one new pack
120
120
'
121
121
122
122
test_expect_success ' gc --no-quiet' '
Original file line number Diff line number Diff line change @@ -1632,7 +1632,10 @@ test_expect_success 'O: blank lines not necessary after other commands' '
1632
1632
INPUT_END
1633
1633
1634
1634
git fast-import <input &&
1635
- test 8 = $(find .git/objects/pack -type f | grep -v multi-pack-index | wc -l) &&
1635
+ ls -la .git/objects/pack/pack-*.pack >packlist &&
1636
+ ls -la .git/objects/pack/pack-*.pack >idxlist &&
1637
+ test_line_count = 4 idxlist &&
1638
+ test_line_count = 4 packlist &&
1636
1639
test $(git rev-parse refs/tags/O3-2nd) = $(git rev-parse O3^) &&
1637
1640
git log --reverse --pretty=oneline O3 | sed s/^.*z// >actual &&
1638
1641
test_cmp expect actual
You can’t perform that action at this time.
0 commit comments