Skip to content

Commit 6693fb3

Browse files
newrengitster
authored andcommitted
t64xx: convert 'test_create_repo' to 'git init'
Convert the merge-specific tests (those in the t64xx range) over to using 'git init' instead of 'test_create_repo'. Reviewed-by: Johannes Schindelin <[email protected]> Signed-off-by: Elijah Newren <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 7c46ea0 commit 6693fb3

11 files changed

+136
-136
lines changed

t/t6400-merge-df.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ test_expect_success 'Simple merge in repo with interesting pathnames' '
126126
# foo/bar-2/baz
127127
# The fact that foo/bar-2 appears between foo/bar and foo/bar/baz
128128
# can trip up some codepaths, and is the point of this test.
129-
test_create_repo name-ordering &&
129+
git init name-ordering &&
130130
(
131131
cd name-ordering &&
132132

t/t6406-merge-attr.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,8 @@ test_expect_success 'custom merge backend' '
162162
'
163163

164164
test_expect_success 'up-to-date merge without common ancestor' '
165-
test_create_repo repo1 &&
166-
test_create_repo repo2 &&
165+
git init repo1 &&
166+
git init repo2 &&
167167
test_tick &&
168168
(
169169
cd repo1 &&

t/t6416-recursive-corner-cases.sh

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
1919
#
2020

2121
test_expect_success 'setup basic criss-cross + rename with no modifications' '
22-
test_create_repo basic-rename &&
22+
git init basic-rename &&
2323
(
2424
cd basic-rename &&
2525
@@ -85,7 +85,7 @@ test_expect_success 'merge simple rename+criss-cross with no modifications' '
8585
#
8686

8787
test_expect_success 'setup criss-cross + rename merges with basic modification' '
88-
test_create_repo rename-modify &&
88+
git init rename-modify &&
8989
(
9090
cd rename-modify &&
9191
@@ -160,7 +160,7 @@ test_expect_success 'merge criss-cross + rename merges with basic modification'
160160
#
161161

162162
test_expect_success 'setup differently handled merges of rename/add conflict' '
163-
test_create_repo rename-add &&
163+
git init rename-add &&
164164
(
165165
cd rename-add &&
166166
@@ -324,7 +324,7 @@ test_expect_success 'git detects differently handled merges conflict, swapped' '
324324
# Merging commits D & E should result in modify/delete conflict.
325325

326326
test_expect_success 'setup criss-cross + modify/delete resolved differently' '
327-
test_create_repo modify-delete &&
327+
git init modify-delete &&
328328
(
329329
cd modify-delete &&
330330
@@ -499,7 +499,7 @@ test_expect_success 'git detects conflict merging criss-cross+modify/delete, rev
499499
#
500500

501501
test_expect_success 'setup differently handled merges of directory/file conflict' '
502-
test_create_repo directory-file &&
502+
git init directory-file &&
503503
(
504504
cd directory-file &&
505505
@@ -867,7 +867,7 @@ test_expect_failure 'merge of D2 & E4 merges a2s & reports conflict for a/file'
867867
# but that may cancel out at the final merge stage".
868868

869869
test_expect_success 'setup rename/rename(1to2)/modify followed by what looks like rename/rename(2to1)/modify' '
870-
test_create_repo rename-squared-squared &&
870+
git init rename-squared-squared &&
871871
(
872872
cd rename-squared-squared &&
873873
@@ -944,7 +944,7 @@ test_expect_success 'handle rename/rename(1to2)/modify followed by what looks li
944944
# content merge handled.
945945

946946
test_expect_success 'setup criss-cross + rename/rename/add-source + modify/modify' '
947-
test_create_repo rename-rename-add-source &&
947+
git init rename-rename-add-source &&
948948
(
949949
cd rename-rename-add-source &&
950950
@@ -1032,7 +1032,7 @@ test_expect_failure 'detect rename/rename/add-source for virtual merge-base' '
10321032
# base of B & C needs to not delete B:c for that to work, though...
10331033

10341034
test_expect_success 'setup criss-cross+rename/rename/add-dest + simple modify' '
1035-
test_create_repo rename-rename-add-dest &&
1035+
git init rename-rename-add-dest &&
10361036
(
10371037
cd rename-rename-add-dest &&
10381038
@@ -1111,7 +1111,7 @@ test_expect_success 'virtual merge base handles rename/rename(1to2)/add-dest' '
11111111
# git detect it?
11121112

11131113
test_expect_success 'setup symlink modify/modify' '
1114-
test_create_repo symlink-modify-modify &&
1114+
git init symlink-modify-modify &&
11151115
(
11161116
cd symlink-modify-modify &&
11171117
@@ -1178,7 +1178,7 @@ test_expect_merge_algorithm failure success 'check symlink modify/modify' '
11781178
# git detect it?
11791179

11801180
test_expect_success 'setup symlink add/add' '
1181-
test_create_repo symlink-add-add &&
1181+
git init symlink-add-add &&
11821182
(
11831183
cd symlink-add-add &&
11841184
@@ -1244,11 +1244,11 @@ test_expect_merge_algorithm failure success 'check symlink add/add' '
12441244
# git detect it?
12451245

12461246
test_expect_success 'setup submodule modify/modify' '
1247-
test_create_repo submodule-modify-modify &&
1247+
git init submodule-modify-modify &&
12481248
(
12491249
cd submodule-modify-modify &&
12501250
1251-
test_create_repo submod &&
1251+
git init submod &&
12521252
(
12531253
cd submod &&
12541254
touch file-A &&
@@ -1332,11 +1332,11 @@ test_expect_merge_algorithm failure success 'check submodule modify/modify' '
13321332
# git detect it?
13331333

13341334
test_expect_success 'setup submodule add/add' '
1335-
test_create_repo submodule-add-add &&
1335+
git init submodule-add-add &&
13361336
(
13371337
cd submodule-add-add &&
13381338
1339-
test_create_repo submod &&
1339+
git init submod &&
13401340
(
13411341
cd submod &&
13421342
touch file-A &&
@@ -1419,11 +1419,11 @@ test_expect_merge_algorithm failure success 'check submodule add/add' '
14191419
# This is an obvious add/add conflict for 'path'. Can git detect it?
14201420

14211421
test_expect_success 'setup conflicting entry types (submodule vs symlink)' '
1422-
test_create_repo submodule-symlink-add-add &&
1422+
git init submodule-symlink-add-add &&
14231423
(
14241424
cd submodule-symlink-add-add &&
14251425
1426-
test_create_repo path &&
1426+
git init path &&
14271427
(
14281428
cd path &&
14291429
touch file-B &&
@@ -1494,7 +1494,7 @@ test_expect_merge_algorithm failure success 'check conflicting entry types (subm
14941494
# This is an obvious add/add mode conflict. Can git detect it?
14951495

14961496
test_expect_success 'setup conflicting modes for regular file' '
1497-
test_create_repo regular-file-mode-conflict &&
1497+
git init regular-file-mode-conflict &&
14981498
(
14991499
cd regular-file-mode-conflict &&
15001500
@@ -1571,7 +1571,7 @@ test_expect_failure 'check conflicting modes for regular file' '
15711571
# to ensure that we handle it as well as practical.
15721572

15731573
test_expect_success 'setup nested conflicts' '
1574-
test_create_repo nested_conflicts &&
1574+
git init nested_conflicts &&
15751575
(
15761576
cd nested_conflicts &&
15771577
@@ -1757,7 +1757,7 @@ test_expect_success 'check nested conflicts' '
17571757
# have three levels of conflict markers. Can we distinguish all three?
17581758

17591759
test_expect_success 'setup virtual merge base with nested conflicts' '
1760-
test_create_repo virtual_merge_base_has_nested_conflicts &&
1760+
git init virtual_merge_base_has_nested_conflicts &&
17611761
(
17621762
cd virtual_merge_base_has_nested_conflicts &&
17631763

t/t6421-merge-partial-clone.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ test_description="limiting blob downloads when merging with partial clones"
3131

3232
test_setup_repo () {
3333
test -d server && return
34-
test_create_repo server &&
34+
git init server &&
3535
(
3636
cd server &&
3737

t/t6422-merge-rename-corner-cases.sh

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ TEST_PASSES_SANITIZE_LEAK=true
1111
. "$TEST_DIRECTORY"/lib-merge.sh
1212

1313
test_setup_rename_delete_untracked () {
14-
test_create_repo rename-delete-untracked &&
14+
git init rename-delete-untracked &&
1515
(
1616
cd rename-delete-untracked &&
1717

@@ -56,7 +56,7 @@ test_expect_success "Does git preserve Gollum's precious artifact?" '
5656
# We should be able to merge B & C cleanly
5757

5858
test_setup_rename_modify_add_source () {
59-
test_create_repo rename-modify-add-source &&
59+
git init rename-modify-add-source &&
6060
(
6161
cd rename-modify-add-source &&
6262

@@ -96,7 +96,7 @@ test_expect_failure 'rename/modify/add-source conflict resolvable' '
9696
'
9797

9898
test_setup_break_detection_1 () {
99-
test_create_repo break-detection-1 &&
99+
git init break-detection-1 &&
100100
(
101101
cd break-detection-1 &&
102102

@@ -144,7 +144,7 @@ test_expect_failure 'conflict caused if rename not detected' '
144144
'
145145

146146
test_setup_break_detection_2 () {
147-
test_create_repo break-detection-2 &&
147+
git init break-detection-2 &&
148148
(
149149
cd break-detection-2 &&
150150

@@ -192,7 +192,7 @@ test_expect_failure 'missed conflict if rename not detected' '
192192
# Commit C: rename a->b, add unrelated a
193193

194194
test_setup_break_detection_3 () {
195-
test_create_repo break-detection-3 &&
195+
git init break-detection-3 &&
196196
(
197197
cd break-detection-3 &&
198198

@@ -268,7 +268,7 @@ test_expect_failure 'detect rename/add-source and preserve all data, merge other
268268
'
269269

270270
test_setup_rename_directory () {
271-
test_create_repo rename-directory-$1 &&
271+
git init rename-directory-$1 &&
272272
(
273273
cd rename-directory-$1 &&
274274

@@ -386,7 +386,7 @@ test_expect_success 'rename/directory conflict + content merge conflict' '
386386
'
387387

388388
test_setup_rename_directory_2 () {
389-
test_create_repo rename-directory-2 &&
389+
git init rename-directory-2 &&
390390
(
391391
cd rename-directory-2 &&
392392

@@ -445,7 +445,7 @@ test_expect_success 'disappearing dir in rename/directory conflict handled' '
445445
# Commit B: modify a, add different b
446446

447447
test_setup_rename_with_content_merge_and_add () {
448-
test_create_repo rename-with-content-merge-and-add-$1 &&
448+
git init rename-with-content-merge-and-add-$1 &&
449449
(
450450
cd rename-with-content-merge-and-add-$1 &&
451451

@@ -570,7 +570,7 @@ test_expect_success 'handle rename-with-content-merge vs. add, merge other way'
570570
# * Nothing else should be present. Is anything?
571571

572572
test_setup_rename_rename_2to1 () {
573-
test_create_repo rename-rename-2to1 &&
573+
git init rename-rename-2to1 &&
574574
(
575575
cd rename-rename-2to1 &&
576576

@@ -642,7 +642,7 @@ test_expect_success 'handle rename/rename (2to1) conflict correctly' '
642642
# Commit B: rename a->b
643643
# Commit C: rename a->c
644644
test_setup_rename_rename_1to2 () {
645-
test_create_repo rename-rename-1to2 &&
645+
git init rename-rename-1to2 &&
646646
(
647647
cd rename-rename-1to2 &&
648648

@@ -700,7 +700,7 @@ test_expect_success 'merge has correct working tree contents' '
700700
# Merging of B & C should NOT be clean; there's a rename/rename conflict
701701

702702
test_setup_rename_rename_1to2_add_source_1 () {
703-
test_create_repo rename-rename-1to2-add-source-1 &&
703+
git init rename-rename-1to2-add-source-1 &&
704704
(
705705
cd rename-rename-1to2-add-source-1 &&
706706

@@ -748,7 +748,7 @@ test_expect_failure 'detect conflict with rename/rename(1to2)/add-source merge'
748748
'
749749

750750
test_setup_rename_rename_1to2_add_source_2 () {
751-
test_create_repo rename-rename-1to2-add-source-2 &&
751+
git init rename-rename-1to2-add-source-2 &&
752752
(
753753
cd rename-rename-1to2-add-source-2 &&
754754

@@ -794,7 +794,7 @@ test_expect_failure 'rename/rename/add-source still tracks new a file' '
794794
'
795795

796796
test_setup_rename_rename_1to2_add_dest () {
797-
test_create_repo rename-rename-1to2-add-dest &&
797+
git init rename-rename-1to2-add-dest &&
798798
(
799799
cd rename-rename-1to2-add-dest &&
800800

@@ -874,7 +874,7 @@ test_expect_success 'rename/rename/add-dest merge still knows about conflicting
874874
# Expected: CONFLICT (rename/add/delete), two-way merged bar
875875

876876
test_setup_rad () {
877-
test_create_repo rad &&
877+
git init rad &&
878878
(
879879
cd rad &&
880880
echo "original file" >foo &&
@@ -946,7 +946,7 @@ test_expect_merge_algorithm failure success 'rad-check: rename/add/delete confli
946946
# Expected: CONFLICT (rename/rename/delete/delete), two-way merged baz
947947

948948
test_setup_rrdd () {
949-
test_create_repo rrdd &&
949+
git init rrdd &&
950950
(
951951
cd rrdd &&
952952
echo foo >foo &&
@@ -1022,7 +1022,7 @@ test_expect_merge_algorithm failure success 'rrdd-check: rename/rename(2to1)/del
10221022
# multi-way merged contents found in two, four, six
10231023

10241024
test_setup_mod6 () {
1025-
test_create_repo mod6 &&
1025+
git init mod6 &&
10261026
(
10271027
cd mod6 &&
10281028
test_seq 11 19 >one &&
@@ -1160,7 +1160,7 @@ test_conflicts_with_adds_and_renames() {
11601160
# tree
11611161
test_setup_collision_conflict () {
11621162
#test_expect_success "setup simple $sideL/$sideR conflict" '
1163-
test_create_repo simple_${sideL}_${sideR} &&
1163+
git init simple_${sideL}_${sideR} &&
11641164
(
11651165
cd simple_${sideL}_${sideR} &&
11661166

@@ -1308,7 +1308,7 @@ test_conflicts_with_adds_and_renames add add
13081308
# So, we have four different conflicting files that all end up at path
13091309
# 'three'.
13101310
test_setup_nested_conflicts_from_rename_rename () {
1311-
test_create_repo nested_conflicts_from_rename_rename &&
1311+
git init nested_conflicts_from_rename_rename &&
13121312
(
13131313
cd nested_conflicts_from_rename_rename &&
13141314

@@ -1417,7 +1417,7 @@ test_expect_success 'check nested conflicts from rename/rename(2to1)' '
14171417
# Expected: CONFLICT(rename/rename) message, three unstaged entries in the
14181418
# index, and contents of orig-[AB] at path orig-[AB]
14191419
test_setup_rename_rename_1_to_2_binary () {
1420-
test_create_repo rename_rename_1_to_2_binary &&
1420+
git init rename_rename_1_to_2_binary &&
14211421
(
14221422
cd rename_rename_1_to_2_binary &&
14231423

0 commit comments

Comments
 (0)