Skip to content

Commit e46775c

Browse files
hanwengitster
authored andcommitted
t6120: use git-update-ref rather than filesystem access
Signed-off-by: Han-Wen Nienhuys <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5e93b90 commit e46775c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

t/t6120-describe.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ 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-
mv .git/refs/tags/A .git/refs/tags/Q &&
110+
git update-ref refs/tags/Q $(git rev-parse refs/tags/A) &&
111+
git update-ref -d refs/tags/A &&
111112
git describe HEAD 2>err >out &&
112113
cat >expected <<-\EOF &&
113114
warning: tag 'Q' is externally known as 'A'
@@ -135,7 +136,8 @@ test_expect_success 'abbrev=0 will not break misplaced tag (2)' '
135136
'
136137

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

141143
test_expect_success 'pack tag refs' 'git pack-refs'

0 commit comments

Comments
 (0)