Skip to content

Commit d80a07d

Browse files
committed
Revert "Merge branch 'hn/refs-test-cleanup' into next"
This reverts commit 2ab8bc2, reversing changes made to b8b636c, to replace the topic with its newer iteration.
1 parent 3f80093 commit d80a07d

File tree

5 files changed

+10
-14
lines changed

5 files changed

+10
-14
lines changed

t/t1503-rev-parse-verify.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ test_expect_success 'main@{n} for various n' '
142142
test_must_fail git rev-parse --verify main@{$Np1}
143143
'
144144

145-
test_expect_success SYMLINKS,REFFILES 'ref resolution not confused by broken symlinks' '
145+
test_expect_success SYMLINKS 'ref resolution not confused by broken symlinks' '
146146
ln -s does-not-exist .git/refs/heads/broken &&
147147
test_must_fail git rev-parse --verify broken
148148
'

t/t2402-worktree-list.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ test_expect_success 'broken main worktree still at the top' '
230230
EOF
231231
cd linked &&
232232
echo "worktree $(pwd)" >expected &&
233-
(cd ../ && test-tool ref-store main create-symref HEAD .broken ) &&
233+
echo "ref: .broken" >../.git/HEAD &&
234234
git worktree list --porcelain >out &&
235235
head -n 3 out >actual &&
236236
test_cmp ../expected actual &&

t/t3320-notes-merge-worktrees.sh

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,8 @@ test_expect_success 'create some new worktrees' '
4646
test_expect_success 'merge z into y fails and sets NOTES_MERGE_REF' '
4747
git config core.notesRef refs/notes/y &&
4848
test_must_fail git notes merge z &&
49-
echo "refs/notes/y" >expect &&
50-
git symbolic-ref NOTES_MERGE_REF >actual &&
51-
test_cmp expect actual
49+
echo "ref: refs/notes/y" >expect &&
50+
test_cmp expect .git/NOTES_MERGE_REF
5251
'
5352

5453
test_expect_success 'merge z into y while mid-merge in another workdir fails' '
@@ -58,7 +57,7 @@ test_expect_success 'merge z into y while mid-merge in another workdir fails' '
5857
test_must_fail git notes merge z 2>err &&
5958
test_i18ngrep "a notes merge into refs/notes/y is already in-progress at" err
6059
) &&
61-
test_must_fail git -C worktree symbolic-ref NOTES_MERGE_REF
60+
test_path_is_missing .git/worktrees/worktree/NOTES_MERGE_REF
6261
'
6362

6463
test_expect_success 'merge z into x while mid-merge on y succeeds' '
@@ -69,9 +68,8 @@ test_expect_success 'merge z into x while mid-merge on y succeeds' '
6968
test_i18ngrep "Automatic notes merge failed" out &&
7069
grep -v "A notes merge into refs/notes/x is already in-progress in" out
7170
) &&
72-
echo "refs/notes/x" >expect &&
73-
git -C worktree2 symbolic-ref NOTES_MERGE_REF >actual &&
74-
test_cmp expect actual
71+
echo "ref: refs/notes/x" >expect &&
72+
test_cmp expect .git/worktrees/worktree2/NOTES_MERGE_REF
7573
'
7674

7775
test_done

t/t6050-replace.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ tagger T A Gger <> 0 +0000
132132
EOF
133133

134134
test_expect_success 'tag replaced commit' '
135-
git update-ref refs/tags/mytag $(git mktag <tag.sig)
135+
git mktag <tag.sig >.git/refs/tags/mytag
136136
'
137137

138138
test_expect_success '"git fsck" works' '

t/t6120-describe.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,7 @@ test_expect_success 'describe --contains defaults to HEAD without commit-ish' '
107107
check_describe tags/A --all A^0
108108

109109
test_expect_success 'renaming tag A to Q locally produces a warning' "
110-
git update-ref refs/tags/Q $(git rev-parse refs/tags/A) &&
111-
git update-ref -d refs/tags/A &&
110+
mv .git/refs/tags/A .git/refs/tags/Q &&
112111
git describe HEAD 2>err >out &&
113112
cat >expected <<-\EOF &&
114113
warning: tag 'Q' is externally known as 'A'
@@ -136,8 +135,7 @@ test_expect_success 'abbrev=0 will not break misplaced tag (2)' '
136135
'
137136

138137
test_expect_success 'rename tag Q back to A' '
139-
git update-ref refs/tags/A $(git rev-parse refs/tags/Q) &&
140-
git update-ref -d refs/tags/Q
138+
mv .git/refs/tags/Q .git/refs/tags/A
141139
'
142140

143141
test_expect_success 'pack tag refs' 'git pack-refs'

0 commit comments

Comments
 (0)