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 <johannes.schindelin@gmx.de> Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Elijah Newren committed
Aug 26, 2022 at 03:49 UTC
6693fb3f01cd99a1b786807a29e92bff43ffa2a0
11 files changed
+136
-136
t/t6400-merge-df.sh
+1
-1
@@ -126,7 +126,7 @@ test_expect_success 'Simple merge in repo with interesting pathnames' '
126
# foo/bar-2/baz
127
# The fact that foo/bar-2 appears between foo/bar and foo/bar/baz
128
# can trip up some codepaths, and is the point of this test.
129
- test_create_repo name-ordering &&
129
+ git init name-ordering &&
130
(
131
cd name-ordering &&
132
t/t6406-merge-attr.sh
+2
-2
@@ -162,8 +162,8 @@ test_expect_success 'custom merge backend' '
162
'
163
164
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 &&
167
test_tick &&
168
(
169
cd repo1 &&
t/t6416-recursive-corner-cases.sh
+19
-19
@@ -19,7 +19,7 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
19
#
20
21
test_expect_success 'setup basic criss-cross + rename with no modifications' '
22
- test_create_repo basic-rename &&
22
+ git init basic-rename &&
23
(
24
cd basic-rename &&
25
@@ -85,7 +85,7 @@ test_expect_success 'merge simple rename+criss-cross with no modifications' '
85
#
86
87
test_expect_success 'setup criss-cross + rename merges with basic modification' '
88
- test_create_repo rename-modify &&
88
+ git init rename-modify &&
89
(
90
cd rename-modify &&
91
@@ -160,7 +160,7 @@ test_expect_success 'merge criss-cross + rename merges with basic modification'
160
#
161
162
test_expect_success 'setup differently handled merges of rename/add conflict' '
163
- test_create_repo rename-add &&
163
+ git init rename-add &&
164
(
165
cd rename-add &&
166
@@ -324,7 +324,7 @@ test_expect_success 'git detects differently handled merges conflict, swapped' '
324
# Merging commits D & E should result in modify/delete conflict.
325
326
test_expect_success 'setup criss-cross + modify/delete resolved differently' '
327
- test_create_repo modify-delete &&
327
+ git init modify-delete &&
328
(
329
cd modify-delete &&
330
@@ -499,7 +499,7 @@ test_expect_success 'git detects conflict merging criss-cross+modify/delete, rev
499
#
500
501
test_expect_success 'setup differently handled merges of directory/file conflict' '
502
- test_create_repo directory-file &&
502
+ git init directory-file &&
503
(
504
cd directory-file &&
505
@@ -867,7 +867,7 @@ test_expect_failure 'merge of D2 & E4 merges a2s & reports conflict for a/file'
867
# but that may cancel out at the final merge stage".
868
869
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 &&
871
(
872
cd rename-squared-squared &&
873
@@ -944,7 +944,7 @@ test_expect_success 'handle rename/rename(1to2)/modify followed by what looks li
944
# content merge handled.
945
946
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 &&
948
(
949
cd rename-rename-add-source &&
950
@@ -1032,7 +1032,7 @@ test_expect_failure 'detect rename/rename/add-source for virtual merge-base' '
1032
# base of B & C needs to not delete B:c for that to work, though...
1033
1034
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 &&
1036
(
1037
cd rename-rename-add-dest &&
1038
@@ -1111,7 +1111,7 @@ test_expect_success 'virtual merge base handles rename/rename(1to2)/add-dest' '
1111
# git detect it?
1112
1113
test_expect_success 'setup symlink modify/modify' '
1114
- test_create_repo symlink-modify-modify &&
1114
+ git init symlink-modify-modify &&
1115
(
1116
cd symlink-modify-modify &&
1117
@@ -1178,7 +1178,7 @@ test_expect_merge_algorithm failure success 'check symlink modify/modify' '
1178
# git detect it?
1179
1180
test_expect_success 'setup symlink add/add' '
1181
- test_create_repo symlink-add-add &&
1181
+ git init symlink-add-add &&
1182
(
1183
cd symlink-add-add &&
1184
@@ -1244,11 +1244,11 @@ test_expect_merge_algorithm failure success 'check symlink add/add' '
1244
# git detect it?
1245
1246
test_expect_success 'setup submodule modify/modify' '
1247
- test_create_repo submodule-modify-modify &&
1247
+ git init submodule-modify-modify &&
1248
(
1249
cd submodule-modify-modify &&
1250
1251
- test_create_repo submod &&
1251
+ git init submod &&
1252
(
1253
cd submod &&
1254
touch file-A &&
@@ -1332,11 +1332,11 @@ test_expect_merge_algorithm failure success 'check submodule modify/modify' '
1332
# git detect it?
1333
1334
test_expect_success 'setup submodule add/add' '
1335
- test_create_repo submodule-add-add &&
1335
+ git init submodule-add-add &&
1336
(
1337
cd submodule-add-add &&
1338
1339
- test_create_repo submod &&
1339
+ git init submod &&
1340
(
1341
cd submod &&
1342
touch file-A &&
@@ -1419,11 +1419,11 @@ test_expect_merge_algorithm failure success 'check submodule add/add' '
1419
# This is an obvious add/add conflict for 'path'. Can git detect it?
1420
1421
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 &&
1423
(
1424
cd submodule-symlink-add-add &&
1425
1426
- test_create_repo path &&
1426
+ git init path &&
1427
(
1428
cd path &&
1429
touch file-B &&
@@ -1494,7 +1494,7 @@ test_expect_merge_algorithm failure success 'check conflicting entry types (subm
1494
# This is an obvious add/add mode conflict. Can git detect it?
1495
1496
test_expect_success 'setup conflicting modes for regular file' '
1497
- test_create_repo regular-file-mode-conflict &&
1497
+ git init regular-file-mode-conflict &&
1498
(
1499
cd regular-file-mode-conflict &&
1500
@@ -1571,7 +1571,7 @@ test_expect_failure 'check conflicting modes for regular file' '
1571
# to ensure that we handle it as well as practical.
1572
1573
test_expect_success 'setup nested conflicts' '
1574
- test_create_repo nested_conflicts &&
1574
+ git init nested_conflicts &&
1575
(
1576
cd nested_conflicts &&
1577
@@ -1757,7 +1757,7 @@ test_expect_success 'check nested conflicts' '
1757
# have three levels of conflict markers. Can we distinguish all three?
1758
1759
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 &&
1761
(
1762
cd virtual_merge_base_has_nested_conflicts &&
1763
t/t6421-merge-partial-clone.sh
+1
-1
@@ -31,7 +31,7 @@ test_description="limiting blob downloads when merging with partial clones"
31
32
test_setup_repo () {
33
test -d server && return
34
- test_create_repo server &&
34
+ git init server &&
35
(
36
cd server &&
37
t/t6422-merge-rename-corner-cases.sh
+19
-19
@@ -11,7 +11,7 @@ TEST_PASSES_SANITIZE_LEAK=true
11
. "$TEST_DIRECTORY"/lib-merge.sh
12
13
test_setup_rename_delete_untracked () {
14
- test_create_repo rename-delete-untracked &&
14
+ git init rename-delete-untracked &&
15
(
16
cd rename-delete-untracked &&
17
@@ -56,7 +56,7 @@ test_expect_success "Does git preserve Gollum's precious artifact?" '
56
# We should be able to merge B & C cleanly
57
58
test_setup_rename_modify_add_source () {
59
- test_create_repo rename-modify-add-source &&
59
+ git init rename-modify-add-source &&
60
(
61
cd rename-modify-add-source &&
62
@@ -96,7 +96,7 @@ test_expect_failure 'rename/modify/add-source conflict resolvable' '
96
'
97
98
test_setup_break_detection_1 () {
99
- test_create_repo break-detection-1 &&
99
+ git init break-detection-1 &&
100
(
101
cd break-detection-1 &&
102
@@ -144,7 +144,7 @@ test_expect_failure 'conflict caused if rename not detected' '
144
'
145
146
test_setup_break_detection_2 () {
147
- test_create_repo break-detection-2 &&
147
+ git init break-detection-2 &&
148
(
149
cd break-detection-2 &&
150
@@ -192,7 +192,7 @@ test_expect_failure 'missed conflict if rename not detected' '
192
# Commit C: rename a->b, add unrelated a
193
194
test_setup_break_detection_3 () {
195
- test_create_repo break-detection-3 &&
195
+ git init break-detection-3 &&
196
(
197
cd break-detection-3 &&
198
@@ -268,7 +268,7 @@ test_expect_failure 'detect rename/add-source and preserve all data, merge other
268
'
269
270
test_setup_rename_directory () {
271
- test_create_repo rename-directory-$1 &&
271
+ git init rename-directory-$1 &&
272
(
273
cd rename-directory-$1 &&
274
@@ -386,7 +386,7 @@ test_expect_success 'rename/directory conflict + content merge conflict' '
386
'
387
388
test_setup_rename_directory_2 () {
389
- test_create_repo rename-directory-2 &&
389
+ git init rename-directory-2 &&
390
(
391
cd rename-directory-2 &&
392
@@ -445,7 +445,7 @@ test_expect_success 'disappearing dir in rename/directory conflict handled' '
445
# Commit B: modify a, add different b
446
447
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 &&
449
(
450
cd rename-with-content-merge-and-add-$1 &&
451
@@ -570,7 +570,7 @@ test_expect_success 'handle rename-with-content-merge vs. add, merge other way'
570
# * Nothing else should be present. Is anything?
571
572
test_setup_rename_rename_2to1 () {
573
- test_create_repo rename-rename-2to1 &&
573
+ git init rename-rename-2to1 &&
574
(
575
cd rename-rename-2to1 &&
576
@@ -642,7 +642,7 @@ test_expect_success 'handle rename/rename (2to1) conflict correctly' '
642
# Commit B: rename a->b
643
# Commit C: rename a->c
644
test_setup_rename_rename_1to2 () {
645
- test_create_repo rename-rename-1to2 &&
645
+ git init rename-rename-1to2 &&
646
(
647
cd rename-rename-1to2 &&
648
@@ -700,7 +700,7 @@ test_expect_success 'merge has correct working tree contents' '
700
# Merging of B & C should NOT be clean; there's a rename/rename conflict
701
702
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 &&
704
(
705
cd rename-rename-1to2-add-source-1 &&
706
@@ -748,7 +748,7 @@ test_expect_failure 'detect conflict with rename/rename(1to2)/add-source merge'
748
'
749
750
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 &&
752
(
753
cd rename-rename-1to2-add-source-2 &&
754
@@ -794,7 +794,7 @@ test_expect_failure 'rename/rename/add-source still tracks new a file' '
794
'
795
796
test_setup_rename_rename_1to2_add_dest () {
797
- test_create_repo rename-rename-1to2-add-dest &&
797
+ git init rename-rename-1to2-add-dest &&
798
(
799
cd rename-rename-1to2-add-dest &&
800
@@ -874,7 +874,7 @@ test_expect_success 'rename/rename/add-dest merge still knows about conflicting
874
# Expected: CONFLICT (rename/add/delete), two-way merged bar
875
876
test_setup_rad () {
877
- test_create_repo rad &&
877
+ git init rad &&
878
(
879
cd rad &&
880
echo "original file" >foo &&
@@ -946,7 +946,7 @@ test_expect_merge_algorithm failure success 'rad-check: rename/add/delete confli
946
# Expected: CONFLICT (rename/rename/delete/delete), two-way merged baz
947
948
test_setup_rrdd () {
949
- test_create_repo rrdd &&
949
+ git init rrdd &&
950
(
951
cd rrdd &&
952
echo foo >foo &&
@@ -1022,7 +1022,7 @@ test_expect_merge_algorithm failure success 'rrdd-check: rename/rename(2to1)/del
1022
# multi-way merged contents found in two, four, six
1023
1024
test_setup_mod6 () {
1025
- test_create_repo mod6 &&
1025
+ git init mod6 &&
1026
(
1027
cd mod6 &&
1028
test_seq 11 19 >one &&
@@ -1160,7 +1160,7 @@ test_conflicts_with_adds_and_renames() {
1160
# tree
1161
test_setup_collision_conflict () {
1162
#test_expect_success "setup simple $sideL/$sideR conflict" '
1163
- test_create_repo simple_${sideL}_${sideR} &&
1163
+ git init simple_${sideL}_${sideR} &&
1164
(
1165
cd simple_${sideL}_${sideR} &&
1166
@@ -1308,7 +1308,7 @@ test_conflicts_with_adds_and_renames add add
1308
# So, we have four different conflicting files that all end up at path
1309
# 'three'.
1310
test_setup_nested_conflicts_from_rename_rename () {
1311
- test_create_repo nested_conflicts_from_rename_rename &&
1311
+ git init nested_conflicts_from_rename_rename &&
1312
(
1313
cd nested_conflicts_from_rename_rename &&
1314
@@ -1417,7 +1417,7 @@ test_expect_success 'check nested conflicts from rename/rename(2to1)' '
1417
# Expected: CONFLICT(rename/rename) message, three unstaged entries in the
1418
# index, and contents of orig-[AB] at path orig-[AB]
1419
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 &&
1421
(
1422
cd rename_rename_1_to_2_binary &&
1423
t/t6423-merge-rename-directories.sh
+69
-69
@@ -40,7 +40,7 @@ test_description="recursive merge with directory renames"
40
# Expected: y/{b,c,d,e/f}
41
42
test_setup_1a () {
43
- test_create_repo 1a &&
43
+ git init 1a &&
44
(
45
cd 1a &&
46
@@ -106,7 +106,7 @@ test_expect_success '1a: Simple directory rename detection' '
106
# Expected: y/{b,c,d,e}
107
108
test_setup_1b () {
109
- test_create_repo 1b &&
109
+ git init 1b &&
110
(
111
cd 1b &&
112
@@ -169,7 +169,7 @@ test_expect_success '1b: Merge a directory with another' '
169
# Expected: y/{b,c,d} (because x/d -> z/d -> y/d)
170
171
test_setup_1c () {
172
- test_create_repo 1c &&
172
+ git init 1c &&
173
(
174
cd 1c &&
175
@@ -232,7 +232,7 @@ test_expect_success '1c: Transitive renaming' '
232
# y/wham_1 & z/wham_2 should too...giving us a conflict.
233
234
test_setup_1d () {
235
- test_create_repo 1d &&
235
+ git init 1d &&
236
(
237
cd 1d &&
238
@@ -328,7 +328,7 @@ test_expect_success '1d: Directory renames cause a rename/rename(2to1) conflict'
328
# Expected: y/{newb,newc,d}
329
330
test_setup_1e () {
331
- test_create_repo 1e &&
331
+ git init 1e &&
332
(
333
cd 1e &&
334
@@ -387,7 +387,7 @@ test_expect_success '1e: Renamed directory, with all files being renamed too' '
387
# Expected: y/{b,c}, x/{d,e,f,g}
388
389
test_setup_1f () {
390
- test_create_repo 1f &&
390
+ git init 1f &&
391
(
392
cd 1f &&
393
@@ -476,7 +476,7 @@ test_expect_success '1f: Split a directory into two other directories' '
476
# Commit B: z/{b,c,d}
477
# Expected: y/b, w/c, z/d, with warning about z/ -> (y/ vs. w/) conflict
478
test_setup_2a () {
479
- test_create_repo 2a &&
479
+ git init 2a &&
480
(
481
cd 2a &&
482
@@ -538,7 +538,7 @@ test_expect_success '2a: Directory split into two on one side, with equal number
538
# Commit B: z/{b,c}, x/d
539
# Expected: y/b, w/c, x/d; No warning about z/ -> (y/ vs. w/) conflict
540
test_setup_2b () {
541
- test_create_repo 2b &&
541
+ git init 2b &&
542
(
543
cd 2b &&
544
@@ -620,7 +620,7 @@ test_expect_success '2b: Directory split into two on one side, with equal number
620
# Commit B: y/{b,c}, x/d
621
# Expected: y/{b,c}, x/d
622
test_setup_3a () {
623
- test_create_repo 3a &&
623
+ git init 3a &&
624
(
625
cd 3a &&
626
@@ -684,7 +684,7 @@ test_expect_success '3a: Avoid implicit rename if involved as source on other si
684
# end up with CONFLICT:(z/d -> y/d vs. x/d vs. w/d), i.e. a
685
# rename/rename/rename(1to3) conflict, which is just weird.
686
test_setup_3b () {
687
- test_create_repo 3b &&
687
+ git init 3b &&
688
(
689
cd 3b &&
690
@@ -807,7 +807,7 @@ test_expect_success '3b: Avoid implicit rename if involved as source on current
807
# NOTE: Even though most files from z moved to y, we don't want f to follow.
808
809
test_setup_4a () {
810
- test_create_repo 4a &&
810
+ git init 4a &&
811
(
812
cd 4a &&
813
@@ -896,7 +896,7 @@ test_expect_success '4a: Directory split, with original directory still present'
896
# index.
897
898
test_setup_5a () {
899
- test_create_repo 5a &&
899
+ git init 5a &&
900
(
901
cd 5a &&
902
@@ -971,7 +971,7 @@ test_expect_success '5a: Merge directories, other side adds files to original an
971
# back to git behavior without the directory rename detection.
972
973
test_setup_5b () {
974
- test_create_repo 5b &&
974
+ git init 5b &&
975
(
976
cd 5b &&
977
@@ -1048,7 +1048,7 @@ test_expect_success '5b: Rename/delete in order to get add/add/add conflict' '
1048
# though, because it doesn't have anything in the way.
1049
1050
test_setup_5c () {
1051
- test_create_repo 5c &&
1051
+ git init 5c &&
1052
(
1053
cd 5c &&
1054
@@ -1138,7 +1138,7 @@ test_expect_success '5c: Transitive rename would cause rename/rename/rename/add/
1138
# directory rename detection for z/f -> y/f.
1139
1140
test_setup_5d () {
1141
- test_create_repo 5d &&
1141
+ git init 5d &&
1142
(
1143
cd 5d &&
1144
@@ -1239,7 +1239,7 @@ test_expect_success '5d: Directory/file/file conflict due to directory rename' '
1239
# it is also involved in a rename/delete conflict.
1240
1241
test_setup_6a () {
1242
- test_create_repo 6a &&
1242
+ git init 6a &&
1243
(
1244
cd 6a &&
1245
@@ -1337,7 +1337,7 @@ test_expect_success '6a: Tricky rename/delete' '
1337
# the behavior on testcases 6b2 and 8e, and introduced this 6b1 testcase.
1338
1339
test_setup_6b1 () {
1340
- test_create_repo 6b1 &&
1340
+ git init 6b1 &&
1341
(
1342
cd 6b1 &&
1343
@@ -1415,7 +1415,7 @@ test_expect_merge_algorithm failure success '6b1: Same renames done on both side
1415
# the z/ -> y/ rename.
1416
1417
test_setup_6b2 () {
1418
- test_create_repo 6b2 &&
1418
+ git init 6b2 &&
1419
(
1420
cd 6b2 &&
1421
@@ -1479,7 +1479,7 @@ test_expect_merge_algorithm failure success '6b2: Same rename done on both sides
1479
# "accidentally detect a rename" and give us y/{b,c,d}.
1480
1481
test_setup_6c () {
1482
- test_create_repo 6c &&
1482
+ git init 6c &&
1483
(
1484
cd 6c &&
1485
@@ -1542,7 +1542,7 @@ test_expect_success '6c: Rename only done on same side' '
1542
# doesn't "accidentally detect a rename" and give us y/{b,c,d}.
1543
1544
test_setup_6d () {
1545
- test_create_repo 6d &&
1545
+ git init 6d &&
1546
(
1547
cd 6d &&
1548
@@ -1605,7 +1605,7 @@ test_expect_success '6d: We do not always want transitive renaming' '
1605
# add/add conflict on y/d_1 vs y/d_2.
1606
1607
test_setup_6e () {
1608
- test_create_repo 6e &&
1608
+ git init 6e &&
1609
(
1610
cd 6e &&
1611
@@ -1700,7 +1700,7 @@ test_expect_success '6e: Add/add from one side' '
1700
# NOTE: There's a rename of z/ here, y/ has more renames, so z/d -> y/d.
1701
1702
test_setup_7a () {
1703
- test_create_repo 7a &&
1703
+ git init 7a &&
1704
(
1705
cd 7a &&
1706
@@ -1772,7 +1772,7 @@ test_expect_success '7a: rename-dir vs. rename-dir (NOT split evenly) PLUS add-o
1772
# Expected: y/{b,c}, CONFLICT(rename/rename(2to1): x/d_1, w/d_2 -> y_d)
1773
1774
test_setup_7b () {
1775
- test_create_repo 7b &&
1775
+ git init 7b &&
1776
(
1777
cd 7b &&
1778
@@ -1861,7 +1861,7 @@ test_expect_success '7b: rename/rename(2to1), but only due to transitive rename'
1861
# nor CONFLiCT x/d -> w/d vs. y/d vs. z/d)
1862
1863
test_setup_7c () {
1864
- test_create_repo 7c &&
1864
+ git init 7c &&
1865
(
1866
cd 7c &&
1867
@@ -1926,7 +1926,7 @@ test_expect_success '7c: rename/rename(1to...2or3); transitive rename may add co
1926
# NOTE: z->y so NOT CONFLICT(delete x/d vs rename to z/d)
1927
1928
test_setup_7d () {
1929
- test_create_repo 7d &&
1929
+ git init 7d &&
1930
(
1931
cd 7d &&
1932
@@ -2027,7 +2027,7 @@ test_expect_success '7d: transitive rename involved in rename/delete; how is it
2027
# how it's resolved.
2028
2029
test_setup_7e () {
2030
- test_create_repo 7e &&
2030
+ git init 7e &&
2031
(
2032
cd 7e &&
2033
@@ -2137,7 +2137,7 @@ test_expect_success '7e: transitive rename in rename/delete AND dirs in the way'
2137
# we potentially could.
2138
2139
test_setup_8a () {
2140
- test_create_repo 8a &&
2140
+ git init 8a &&
2141
(
2142
cd 8a &&
2143
@@ -2216,7 +2216,7 @@ test_expect_success '8a: Dual-directory rename, one into the others way' '
2216
# e_1 and e_2.
2217
2218
test_setup_8b () {
2219
- test_create_repo 8b &&
2219
+ git init 8b &&
2220
(
2221
cd 8b &&
2222
@@ -2290,7 +2290,7 @@ test_expect_success '8b: Dual-directory rename, one into the others way, with co
2290
# notes in 8d.
2291
2292
test_setup_8c () {
2293
- test_create_repo 8c &&
2293
+ git init 8c &&
2294
(
2295
cd 8c &&
2296
@@ -2370,7 +2370,7 @@ test_expect_success '8c: modify/delete or rename+modify/delete' '
2370
# differently.
2371
2372
test_setup_8d () {
2373
- test_create_repo 8d &&
2373
+ git init 8d &&
2374
(
2375
cd 8d &&
2376
@@ -2453,7 +2453,7 @@ test_expect_success '8d: rename/delete...or not?' '
2453
# the behavior, and predict it without computing as many details.
2454
2455
test_setup_8e () {
2456
- test_create_repo 8e &&
2456
+ git init 8e &&
2457
(
2458
cd 8e &&
2459
@@ -2537,7 +2537,7 @@ test_expect_success '8e: Both sides rename, one side adds to original directory'
2537
# of that could take the new file in commit B at z/i to x/w/i or x/i.
2538
2539
test_setup_9a () {
2540
- test_create_repo 9a &&
2540
+ git init 9a &&
2541
(
2542
cd 9a &&
2543
@@ -2609,7 +2609,7 @@ test_expect_success '9a: Inner renamed directory within outer renamed directory'
2609
# Expected: y/{b,c,d_merged}
2610
2611
test_setup_9b () {
2612
- test_create_repo 9b &&
2612
+ git init 9b &&
2613
(
2614
cd 9b &&
2615
@@ -2697,7 +2697,7 @@ test_expect_success '9b: Transitive rename with content merge' '
2697
# history for any implicit directory renames.
2698
2699
test_setup_9c () {
2700
- test_create_repo 9c &&
2700
+ git init 9c &&
2701
(
2702
cd 9c &&
2703
@@ -2786,7 +2786,7 @@ test_expect_success '9c: Doubly transitive rename?' '
2786
# testcases and simplifies things for the user.
2787
2788
test_setup_9d () {
2789
- test_create_repo 9d &&
2789
+ git init 9d &&
2790
(
2791
cd 9d &&
2792
@@ -2861,7 +2861,7 @@ test_expect_success '9d: N-way transitive rename?' '
2861
# dir1/yo, dir2/yo, dir3/yo, dirN/yo
2862
2863
test_setup_9e () {
2864
- test_create_repo 9e &&
2864
+ git init 9e &&
2865
(
2866
cd 9e &&
2867
@@ -2954,7 +2954,7 @@ test_expect_success '9e: N-to-1 whammo' '
2954
# Expected: priority/{a,b}/$more_files, priority/c
2955
2956
test_setup_9f () {
2957
- test_create_repo 9f &&
2957
+ git init 9f &&
2958
(
2959
cd 9f &&
2960
@@ -3027,7 +3027,7 @@ test_expect_success '9f: Renamed directory that only contained immediate subdirs
3027
# viewpoint...
3028
3029
test_setup_9g () {
3030
- test_create_repo 9g &&
3030
+ git init 9g &&
3031
(
3032
cd 9g &&
3033
@@ -3096,7 +3096,7 @@ test_expect_failure '9g: Renamed directory that only contained immediate subdirs
3096
# NOTE: If we applied the z/ -> y/ rename to z/d, then we'd end up with
3097
# a rename/rename(1to2) conflict (z/d -> y/d vs. x/d)
3098
test_setup_9h () {
3099
- test_create_repo 9h &&
3099
+ git init 9h &&
3100
(
3101
cd 9h &&
3102
@@ -3177,7 +3177,7 @@ test_expect_success '9h: Avoid dir rename on merely modified path' '
3177
# ERROR_MSG(untracked working tree files would be overwritten by merge)
3178
3179
test_setup_10a () {
3180
- test_create_repo 10a &&
3180
+ git init 10a &&
3181
(
3182
cd 10a &&
3183
@@ -3243,7 +3243,7 @@ test_expect_success '10a: Overwrite untracked with normal rename/delete' '
3243
# ERROR_MSG(refusing to lose untracked file at 'y/d')
3244
3245
test_setup_10b () {
3246
- test_create_repo 10b &&
3246
+ git init 10b &&
3247
(
3248
cd 10b &&
3249
@@ -3334,7 +3334,7 @@ test_expect_success '10b: Overwrite untracked with dir rename + delete' '
3334
# ERROR_MSG(Refusing to lose untracked file at y/c)
3335
3336
test_setup_10c () {
3337
- test_create_repo 10c_$1 &&
3337
+ git init 10c_$1 &&
3338
(
3339
cd 10c_$1 &&
3340
@@ -3472,7 +3472,7 @@ test_expect_success '10c2: Overwrite untracked with dir rename/rename(1to2), oth
3472
# ERROR_MSG(Refusing to lose untracked file at y/wham)
3473
3474
test_setup_10d () {
3475
- test_create_repo 10d &&
3475
+ git init 10d &&
3476
(
3477
cd 10d &&
3478
@@ -3568,7 +3568,7 @@ test_expect_success '10d: Delete untracked with dir rename/rename(2to1)' '
3568
# Expected: y/{a,b,c} + untracked z/c
3569
3570
test_setup_10e () {
3571
- test_create_repo 10e &&
3571
+ git init 10e &&
3572
(
3573
cd 10e &&
3574
@@ -3650,7 +3650,7 @@ test_expect_merge_algorithm failure success '10e: Does git complain about untrac
3650
# z/c with uncommitted mods on top of A:z/c_v1
3651
3652
test_setup_11a () {
3653
- test_create_repo 11a &&
3653
+ git init 11a &&
3654
(
3655
cd 11a &&
3656
@@ -3728,7 +3728,7 @@ test_expect_success '11a: Avoid losing dirty contents with simple rename' '
3728
3729
3730
test_setup_11b () {
3731
- test_create_repo 11b &&
3731
+ git init 11b &&
3732
(
3733
cd 11b &&
3734
@@ -3810,7 +3810,7 @@ test_expect_success '11b: Avoid losing dirty file involved in directory rename'
3810
# y/c left untouched (still has uncommitted mods)
3811
3812
test_setup_11c () {
3813
- test_create_repo 11c &&
3813
+ git init 11c &&
3814
(
3815
cd 11c &&
3816
@@ -3883,7 +3883,7 @@ test_expect_success '11c: Avoid losing not-uptodate with rename + D/F conflict'
3883
# y/{a,c~HEAD,c/d}, x/b, now-untracked z/c_v1 with uncommitted mods
3884
3885
test_setup_11d () {
3886
- test_create_repo 11d &&
3886
+ git init 11d &&
3887
(
3888
cd 11d &&
3889
@@ -3968,7 +3968,7 @@ test_expect_success '11d: Avoid losing not-uptodate with rename + D/F conflict'
3968
# y/c has dirty file from before merge
3969
3970
test_setup_11e () {
3971
- test_create_repo 11e &&
3971
+ git init 11e &&
3972
(
3973
cd 11e &&
3974
@@ -4060,7 +4060,7 @@ test_expect_success '11e: Avoid deleting not-uptodate with dir rename/rename(1to
4060
# ERROR_MSG(Refusing to lose dirty file at y/wham)
4061
4062
test_setup_11f () {
4063
- test_create_repo 11f &&
4063
+ git init 11f &&
4064
(
4065
cd 11f &&
4066
@@ -4155,7 +4155,7 @@ test_expect_success '11f: Avoid deleting not-uptodate with dir rename/rename(2to
4155
# Expected: node1/{leaf1,leaf2,leaf5,node2/{leaf3,leaf4,leaf6}}
4156
4157
test_setup_12a () {
4158
- test_create_repo 12a &&
4158
+ git init 12a &&
4159
(
4160
cd 12a &&
4161
@@ -4238,7 +4238,7 @@ test_expect_success '12a: Moving one directory hierarchy into another' '
4238
# node2/node1/{leaf1, leaf2}
4239
4240
test_setup_12b1 () {
4241
- test_create_repo 12b1 &&
4241
+ git init 12b1 &&
4242
(
4243
cd 12b1 &&
4244
@@ -4327,7 +4327,7 @@ test_expect_merge_algorithm failure success '12b1: Moving two directory hierarch
4327
# even simple rules give weird results when given weird inputs.
4328
4329
test_setup_12b2 () {
4330
- test_create_repo 12b2 &&
4330
+ git init 12b2 &&
4331
(
4332
cd 12b2 &&
4333
@@ -4402,7 +4402,7 @@ test_expect_success '12b2: Moving two directory hierarchies into each other' '
4402
# each side of the merge.
4403
4404
test_setup_12c1 () {
4405
- test_create_repo 12c1 &&
4405
+ git init 12c1 &&
4406
(
4407
cd 12c1 &&
4408
@@ -4492,7 +4492,7 @@ test_expect_merge_algorithm failure success '12c1: Moving one directory hierarch
4492
# on each side of the merge.
4493
4494
test_setup_12c2 () {
4495
- test_create_repo 12c2 &&
4495
+ git init 12c2 &&
4496
(
4497
cd 12c2 &&
4498
@@ -4584,7 +4584,7 @@ test_expect_success '12c2: Moving one directory hierarchy into another w/ conten
4584
# Expected: subdir/foo, bar
4585
4586
test_setup_12d () {
4587
- test_create_repo 12d &&
4587
+ git init 12d &&
4588
(
4589
cd 12d &&
4590
@@ -4642,7 +4642,7 @@ test_expect_success '12d: Rename/merge subdir into the root, variant 1' '
4642
# Expected: foo, bar
4643
4644
test_setup_12e () {
4645
- test_create_repo 12e &&
4645
+ git init 12e &&
4646
(
4647
cd 12e &&
4648
@@ -4743,7 +4743,7 @@ test_expect_success '12e: Rename/merge subdir into the root, variant 2' '
4743
# pick and re-applying them in the subsequent one.
4744
4745
test_setup_12f () {
4746
- test_create_repo 12f &&
4746
+ git init 12f &&
4747
(
4748
cd 12f &&
4749
@@ -4902,7 +4902,7 @@ test_expect_merge_algorithm failure success '12f: Trivial directory resolve, cac
4902
# Expected: newfile_{merged}, newdir/{a_B,b_B,c_A}
4903
4904
test_setup_12g () {
4905
- test_create_repo 12g &&
4905
+ git init 12g &&
4906
(
4907
cd 12g &&
4908
@@ -4973,7 +4973,7 @@ test_expect_success '12g: Testcase with two kinds of "relevant" renames' '
4973
# Expected: newdir/{alpha_2, b}
4974
4975
test_setup_12h () {
4976
- test_create_repo 12h &&
4976
+ git init 12h &&
4977
(
4978
cd 12h &&
4979
@@ -5032,7 +5032,7 @@ test_expect_failure '12h: renaming a file within a renamed directory' '
5032
# source/bar vs. source/subdir/bar
5033
5034
test_setup_12i () {
5035
- test_create_repo 12i &&
5035
+ git init 12i &&
5036
(
5037
cd 12i &&
5038
@@ -5090,7 +5090,7 @@ test_expect_success '12i: Directory rename causes rename-to-self' '
5090
# Expected: {foo, bar, baz_2}, with conflicts on bar vs. subdir/bar
5091
5092
test_setup_12j () {
5093
- test_create_repo 12j &&
5093
+ git init 12j &&
5094
(
5095
cd 12j &&
5096
@@ -5148,7 +5148,7 @@ test_expect_success '12j: Directory rename to root causes rename-to-self' '
5148
# Expected: dirA/{foo, bar, baz_2}, with conflicts on dirA/bar vs. dirB/bar
5149
5150
test_setup_12k () {
5151
- test_create_repo 12k &&
5151
+ git init 12k &&
5152
(
5153
cd 12k &&
5154
@@ -5218,7 +5218,7 @@ test_expect_success '12k: Directory rename with sibling causes rename-to-self' '
5218
# is needed for there to be a sub1/ -> sub3/ rename.
5219
5220
test_setup_12l () {
5221
- test_create_repo 12l_$1 &&
5221
+ git init 12l_$1 &&
5222
(
5223
cd 12l_$1 &&
5224
@@ -5322,7 +5322,7 @@ test_expect_merge_algorithm failure success '12l (A into B): Rename into each ot
5322
# Expected: y/{b,c,d,e/f}, with notices/conflicts for both y/d and y/e/f
5323
5324
test_setup_13a () {
5325
- test_create_repo 13a_$1 &&
5325
+ git init 13a_$1 &&
5326
(
5327
cd 13a_$1 &&
5328
@@ -5409,7 +5409,7 @@ test_expect_success '13a(info): messages for newly added files' '
5409
# one about content, and one about file location
5410
5411
test_setup_13b () {
5412
- test_create_repo 13b_$1 &&
5412
+ git init 13b_$1 &&
5413
(
5414
cd 13b_$1 &&
5415
@@ -5496,7 +5496,7 @@ test_expect_success '13b(info): messages for transitive rename with conflicted c
5496
# shown in testcase 13d.
5497
5498
test_setup_13c () {
5499
- test_create_repo 13c_$1 &&
5499
+ git init 13c_$1 &&
5500
(
5501
cd 13c_$1 &&
5502
@@ -5584,7 +5584,7 @@ test_expect_success '13c(info): messages for rename/rename(1to1) via transitive
5584
# No conflict in where a/y ends up, so put it in d/y.
5585
5586
test_setup_13d () {
5587
- test_create_repo 13d_$1 &&
5587
+ git init 13d_$1 &&
5588
(
5589
cd 13d_$1 &&
5590
@@ -5710,7 +5710,7 @@ test_expect_success '13d(info): messages for rename/rename(1to1) via dual transi
5710
# least avoids hitting a BUG().
5711
#
5712
test_setup_13e () {
5713
- test_create_repo 13e &&
5713
+ git init 13e &&
5714
(
5715
cd 13e &&
5716
t/t6426-merge-skip-unneeded-updates.sh
+8
-8
@@ -38,7 +38,7 @@ test_description="merge cases"
38
# Expected: b_2
39
40
test_setup_1a () {
41
- test_create_repo 1a_$1 &&
41
+ git init 1a_$1 &&
42
(
43
cd 1a_$1 &&
44
@@ -136,7 +136,7 @@ test_expect_success '1a-R: Modify(A)/Modify(B), change on B subset of A' '
136
# Expected: c_2
137
138
test_setup_2a () {
139
- test_create_repo 2a_$1 &&
139
+ git init 2a_$1 &&
140
(
141
cd 2a_$1 &&
142
@@ -229,7 +229,7 @@ test_expect_success '2a-R: Modify/rename, merge into rename side' '
229
# Expected: c_2
230
231
test_setup_2b () {
232
- test_create_repo 2b_$1 &&
232
+ git init 2b_$1 &&
233
(
234
cd 2b_$1 &&
235
@@ -336,7 +336,7 @@ test_expect_success '2b-R: Rename+Mod(A)/Mod(B), B mods subset of A' '
336
# not make that particular mistake.
337
338
test_setup_2c () {
339
- test_create_repo 2c &&
339
+ git init 2c &&
340
(
341
cd 2c &&
342
@@ -437,7 +437,7 @@ test_expect_success '2c: Modify b & add c VS rename b->c' '
437
# Expected: bar/{bq_2, whatever}
438
439
test_setup_3a () {
440
- test_create_repo 3a_$1 &&
440
+ git init 3a_$1 &&
441
(
442
cd 3a_$1 &&
443
@@ -537,7 +537,7 @@ test_expect_success '3a-R: bq_1->foo/bq_2 on A, foo/->bar/ on B' '
537
# Expected: bar/{bq_2, whatever}
538
539
test_setup_3b () {
540
- test_create_repo 3b_$1 &&
540
+ git init 3b_$1 &&
541
(
542
cd 3b_$1 &&
543
@@ -642,7 +642,7 @@ test_expect_success '3b-R: bq_1->foo/bq_2 on A, foo/->bar/ on B' '
642
# Expected: b_2 for merge, b_4 in working copy
643
644
test_setup_4a () {
645
- test_create_repo 4a &&
645
+ git init 4a &&
646
(
647
cd 4a &&
648
@@ -714,7 +714,7 @@ test_expect_merge_algorithm failure success '4a: Change on A, change on B subset
714
# Expected: c_2
715
716
test_setup_4b () {
717
- test_create_repo 4b &&
717
+ git init 4b &&
718
(
719
cd 4b &&
720
t/t6427-diff3-conflict-markers.sh
+5
-5
@@ -19,7 +19,7 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
19
#
20
21
test_expect_success 'setup no merge base' '
22
- test_create_repo no_merge_base &&
22
+ git init no_merge_base &&
23
(
24
cd no_merge_base &&
25
@@ -55,7 +55,7 @@ test_expect_success 'check no merge base' '
55
#
56
57
test_expect_success 'setup unique merge base' '
58
- test_create_repo unique_merge_base &&
58
+ git init unique_merge_base &&
59
(
60
cd unique_merge_base &&
61
@@ -116,7 +116,7 @@ test_expect_success 'check unique merge base' '
116
#
117
118
test_expect_success 'setup multiple merge bases' '
119
- test_create_repo multiple_merge_bases &&
119
+ git init multiple_merge_bases &&
120
(
121
cd multiple_merge_bases &&
122
@@ -190,7 +190,7 @@ test_expect_success 'check multiple merge bases' '
190
'
191
192
test_expect_success 'rebase --merge describes parent of commit being picked' '
193
- test_create_repo rebase &&
193
+ git init rebase &&
194
(
195
cd rebase &&
196
test_commit base file &&
@@ -212,7 +212,7 @@ test_expect_success 'rebase --apply describes fake ancestor base' '
212
'
213
214
test_setup_zdiff3 () {
215
- test_create_repo zdiff3 &&
215
+ git init zdiff3 &&
216
(
217
cd zdiff3 &&
218
t/t6428-merge-conflicts-sparse.sh
+1
-1
@@ -29,7 +29,7 @@ test_description="merge cases"
29
# Testcase basic, conflicting changes in 'numerals'
30
31
test_setup_numerals () {
32
- test_create_repo numerals_$1 &&
32
+ git init numerals_$1 &&
33
(
34
cd numerals_$1 &&
35
t/t6429-merge-sequence-rename-caching.sh
+7
-7
@@ -35,7 +35,7 @@ test_description="remember regular & dir renames in sequence of merges"
35
# preventing us from finding new renames.
36
#
37
test_expect_success 'caching renames does not preclude finding new ones' '
38
- test_create_repo caching-renames-and-new-renames &&
38
+ git init caching-renames-and-new-renames &&
39
(
40
cd caching-renames-and-new-renames &&
41
@@ -106,7 +106,7 @@ test_expect_success 'caching renames does not preclude finding new ones' '
106
# should be able to only run rename detection on the upstream side one
107
# time.)
108
test_expect_success 'cherry-pick both a commit and its immediate revert' '
109
- test_create_repo pick-commit-and-its-immediate-revert &&
109
+ git init pick-commit-and-its-immediate-revert &&
110
(
111
cd pick-commit-and-its-immediate-revert &&
112
@@ -162,7 +162,7 @@ test_expect_success 'cherry-pick both a commit and its immediate revert' '
162
# could cause a spurious rename/add conflict.
163
#
164
test_expect_success 'rename same file identically, then reintroduce it' '
165
- test_create_repo rename-rename-1to1-then-add-old-filename &&
165
+ git init rename-rename-1to1-then-add-old-filename &&
166
(
167
cd rename-rename-1to1-then-add-old-filename &&
168
@@ -229,7 +229,7 @@ test_expect_success 'rename same file identically, then reintroduce it' '
229
# cached, the directory rename could put newfile in the wrong directory.
230
#
231
test_expect_success 'rename same file identically, then add file to old dir' '
232
- test_create_repo rename-rename-1to1-then-add-file-to-old-dir &&
232
+ git init rename-rename-1to1-then-add-file-to-old-dir &&
233
(
234
cd rename-rename-1to1-then-add-file-to-old-dir &&
235
@@ -311,7 +311,7 @@ test_expect_success 'rename same file identically, then add file to old dir' '
311
# should avoid the need to re-detect upstream renames.)
312
#
313
test_expect_success 'cached dir rename does not prevent noticing later conflict' '
314
- test_create_repo dir-rename-cache-not-occluding-later-conflict &&
314
+ git init dir-rename-cache-not-occluding-later-conflict &&
315
(
316
cd dir-rename-cache-not-occluding-later-conflict &&
317
@@ -365,7 +365,7 @@ test_expect_success 'cached dir rename does not prevent noticing later conflict'
365
366
# Helper for the next two tests
367
test_setup_upstream_rename () {
368
- test_create_repo $1 &&
368
+ git init $1 &&
369
(
370
cd $1 &&
371
@@ -537,7 +537,7 @@ test_expect_success 'dir rename unneeded, then rename existing file into old dir
537
538
# Helper for the next two tests
539
test_setup_topic_rename () {
540
- test_create_repo $1 &&
540
+ git init $1 &&
541
(
542
cd $1 &&
543
t/t6437-submodule-merge.sh
+4
-4
@@ -336,7 +336,7 @@ test_expect_success 'recursive merge with submodule' '
336
# Expected: path/ is submodule and file contents for B's path are somewhere
337
338
test_expect_success 'setup file/submodule conflict' '
339
- test_create_repo file-submodule &&
339
+ git init file-submodule &&
340
(
341
cd file-submodule &&
342
@@ -351,7 +351,7 @@ test_expect_success 'setup file/submodule conflict' '
351
git commit -m B &&
352
353
git checkout A &&
354
- test_create_repo path &&
354
+ git init path &&
355
test_commit -C path world &&
356
git submodule add ./path &&
357
git commit -m A
@@ -411,7 +411,7 @@ test_expect_success 'file/submodule conflict; merge --abort works afterward' '
411
# under the submodule to be treated as untracked or in the way.
412
413
test_expect_success 'setup directory/submodule conflict' '
414
- test_create_repo directory-submodule &&
414
+ git init directory-submodule &&
415
(
416
cd directory-submodule &&
417
@@ -434,7 +434,7 @@ test_expect_success 'setup directory/submodule conflict' '
434
git commit -m B2 &&
435
436
git checkout A &&
437
- test_create_repo path &&
437
+ git init path &&
438
test_commit -C path hello world &&
439
git submodule add ./path &&
440
git commit -m A