File tree Expand file tree Collapse file tree 5 files changed +25
-25
lines changed Expand file tree Collapse file tree 5 files changed +25
-25
lines changed Original file line number Diff line number Diff line change @@ -76,24 +76,24 @@ test_expect_success 'reflog of worktrees/xx/HEAD' '
76
76
test_cmp expected actual.wt2
77
77
'
78
78
79
- test_expect_success ' for-each-ref from main repo ' '
79
+ test_expect_success ' for-each-ref from main worktree ' '
80
80
mkdir fer1 &&
81
81
git -C fer1 init repo &&
82
82
test_commit -C fer1/repo initial &&
83
83
git -C fer1/repo worktree add ../second &&
84
- git -C fer1/repo update-ref refs/bisect/main HEAD &&
85
- git -C fer1/repo update-ref refs/rewritten/main HEAD &&
86
- git -C fer1/repo update-ref refs/worktree/main HEAD &&
87
- git -C fer1/repo for-each-ref --format="%(refname)" | grep main >actual &&
84
+ git -C fer1/repo update-ref refs/bisect/first HEAD &&
85
+ git -C fer1/repo update-ref refs/rewritten/first HEAD &&
86
+ git -C fer1/repo update-ref refs/worktree/first HEAD &&
87
+ git -C fer1/repo for-each-ref --format="%(refname)" | grep first >actual &&
88
88
cat >expected <<-\EOF &&
89
- refs/bisect/main
90
- refs/rewritten/main
91
- refs/worktree/main
89
+ refs/bisect/first
90
+ refs/rewritten/first
91
+ refs/worktree/first
92
92
EOF
93
93
test_cmp expected actual
94
94
'
95
95
96
- test_expect_success ' for-each-ref from linked repo ' '
96
+ test_expect_success ' for-each-ref from linked worktree ' '
97
97
mkdir fer2 &&
98
98
git -C fer2 init repo &&
99
99
test_commit -C fer2/repo initial &&
Original file line number Diff line number Diff line change @@ -171,7 +171,7 @@ test_expect_success '--full-diff is not affected by --parents' '
171
171
test_expect_success ' rebuild repo' '
172
172
rm -rf .git * &&
173
173
git init &&
174
- git switch -c main &&
174
+ git switch -c topic &&
175
175
176
176
echo base >file &&
177
177
git add file &&
@@ -186,7 +186,7 @@ test_expect_success 'rebuild repo' '
186
186
git add file &&
187
187
test_commit B &&
188
188
189
- git switch main &&
189
+ git switch topic &&
190
190
test_must_fail git merge -m "M" B &&
191
191
echo A >file &&
192
192
echo B >>file &&
@@ -207,7 +207,7 @@ test_expect_success 'rebuild repo' '
207
207
git merge -m R -Xtheirs X &&
208
208
note R &&
209
209
210
- git switch main &&
210
+ git switch topic &&
211
211
git merge -m N R &&
212
212
note N &&
213
213
@@ -221,7 +221,7 @@ test_expect_success 'rebuild repo' '
221
221
git add z &&
222
222
test_commit Z &&
223
223
224
- git switch main &&
224
+ git switch topic &&
225
225
git merge -m O Z &&
226
226
note O &&
227
227
Original file line number Diff line number Diff line change @@ -124,18 +124,18 @@ test_expect_success 'Simple merge in repo with interesting pathnames' '
124
124
git add . &&
125
125
git commit -m initial &&
126
126
127
- git branch main &&
127
+ git branch topic &&
128
128
git branch other &&
129
129
130
130
git checkout other &&
131
131
echo other >foo/bar-2/baz &&
132
132
git add -u &&
133
133
git commit -m other &&
134
134
135
- git checkout main &&
136
- echo main >foo/bar/baz &&
135
+ git checkout topic &&
136
+ echo topic >foo/bar/baz &&
137
137
git add -u &&
138
- git commit -m main &&
138
+ git commit -m topic &&
139
139
140
140
git merge other &&
141
141
git ls-files -s >out &&
Original file line number Diff line number Diff line change @@ -35,11 +35,11 @@ test_expect_success 'setup branch sub' '
35
35
test_commit foo
36
36
'
37
37
38
- test_expect_success ' setup branch main ' '
39
- git checkout -b main master &&
38
+ test_expect_success ' setup topic branch ' '
39
+ git checkout -b topic master &&
40
40
git merge -s ours --no-commit --allow-unrelated-histories sub &&
41
41
git read-tree --prefix=dir/ -u sub &&
42
- git commit -m "initial merge of sub into main " &&
42
+ git commit -m "initial merge of sub into topic " &&
43
43
test_path_is_file dir/foo.t &&
44
44
test_path_is_file hello
45
45
'
@@ -49,9 +49,9 @@ test_expect_success 'update branch sub' '
49
49
test_commit bar
50
50
'
51
51
52
- test_expect_success ' update branch main ' '
53
- git checkout main &&
54
- git merge -s subtree sub -m "second merge of sub into main " &&
52
+ test_expect_success ' update topic branch ' '
53
+ git checkout topic &&
54
+ git merge -s subtree sub -m "second merge of sub into topic " &&
55
55
test_path_is_file dir/bar.t &&
56
56
test_path_is_file dir/foo.t &&
57
57
test_path_is_file hello
Original file line number Diff line number Diff line change @@ -663,7 +663,7 @@ test_expect_failure 'merge-recursive rename vs. rename/symlink' '
663
663
664
664
test_expect_success ' merging with triple rename across D/F conflict' '
665
665
git reset --hard HEAD &&
666
- git checkout -b main &&
666
+ git checkout -b topic &&
667
667
git rm -rf . &&
668
668
669
669
echo "just a file" >sub1 &&
@@ -682,7 +682,7 @@ test_expect_success 'merging with triple rename across D/F conflict' '
682
682
test_tick &&
683
683
git commit -a -m changesimplefile &&
684
684
685
- git checkout main &&
685
+ git checkout topic &&
686
686
git rm sub1 &&
687
687
git mv sub2 sub1 &&
688
688
test_tick &&
You can’t perform that action at this time.
0 commit comments