Skip to content

Commit 749f126

Browse files
ttaylorrgitster
authored andcommitted
t5328: avoid top-level directory changes
In a similar spirit as the last commit, avoid top-level directory changes in the last remaining commit-graph related test, t5328. Signed-off-by: Taylor Blau <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 51550d0 commit 749f126

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

t/t5328-commit-graph-64bit-time.sh

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -37,39 +37,39 @@ test_expect_success 'lower layers have overflow chunk' '
3737
graph_git_behavior 'overflow' '' HEAD~2 HEAD
3838

3939
test_expect_success 'set up and verify repo with generation data overflow chunk' '
40-
mkdir repo &&
41-
cd repo &&
42-
git init &&
43-
test_commit --date "$UNIX_EPOCH_ZERO" 1 &&
44-
test_commit 2 &&
45-
test_commit --date "$UNIX_EPOCH_ZERO" 3 &&
46-
git commit-graph write --reachable &&
47-
graph_read_expect 3 generation_data &&
48-
test_commit --date "$FUTURE_DATE" 4 &&
49-
test_commit 5 &&
50-
test_commit --date "$UNIX_EPOCH_ZERO" 6 &&
51-
git branch left &&
52-
git reset --hard 3 &&
53-
test_commit 7 &&
54-
test_commit --date "$FUTURE_DATE" 8 &&
55-
test_commit 9 &&
56-
git branch right &&
57-
git reset --hard 3 &&
58-
test_merge M left right &&
59-
git commit-graph write --reachable &&
60-
graph_read_expect 10 "generation_data generation_data_overflow" &&
61-
git commit-graph verify
40+
git init repo &&
41+
(
42+
cd repo &&
43+
test_commit --date "$UNIX_EPOCH_ZERO" 1 &&
44+
test_commit 2 &&
45+
test_commit --date "$UNIX_EPOCH_ZERO" 3 &&
46+
git commit-graph write --reachable &&
47+
graph_read_expect 3 generation_data &&
48+
test_commit --date "$FUTURE_DATE" 4 &&
49+
test_commit 5 &&
50+
test_commit --date "$UNIX_EPOCH_ZERO" 6 &&
51+
git branch left &&
52+
git reset --hard 3 &&
53+
test_commit 7 &&
54+
test_commit --date "$FUTURE_DATE" 8 &&
55+
test_commit 9 &&
56+
git branch right &&
57+
git reset --hard 3 &&
58+
test_merge M left right &&
59+
git commit-graph write --reachable &&
60+
graph_read_expect 10 "generation_data generation_data_overflow" &&
61+
git commit-graph verify
62+
)
6263
'
6364

6465
graph_git_behavior 'overflow 2' repo left right
6566

6667
test_expect_success 'single commit with generation data exceeding UINT32_MAX' '
6768
git init repo-uint32-max &&
68-
cd repo-uint32-max &&
69-
test_commit --date "@4294967297 +0000" 1 &&
70-
git commit-graph write --reachable &&
71-
graph_read_expect 1 "generation_data" &&
72-
git commit-graph verify
69+
test_commit -C repo-uint32-max --date "@4294967297 +0000" 1 &&
70+
git -C repo-uint32-max commit-graph write --reachable &&
71+
graph_read_expect -C repo-uint32-max 1 "generation_data" &&
72+
git -C repo-uint32-max commit-graph verify
7373
'
7474

7575
test_done

0 commit comments

Comments
 (0)