Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHan-Wen Nienhuys <hanwen@google.com>2021-08-02 19:53:28 +0300
committerJunio C Hamano <gitster@pobox.com>2021-08-02 23:17:20 +0300
commite46775cf9e1c6ddca0ada3c1ca24876b79a23d9a (patch)
tree286f701e78a036467d61bdc3f862e4b6ebd765e8 /t/t6120-describe.sh
parent5e93b90dea18ba3a44b405d375d2276cb903ece4 (diff)
t6120: use git-update-ref rather than filesystem access
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t6120-describe.sh')
-rwxr-xr-xt/t6120-describe.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/t/t6120-describe.sh b/t/t6120-describe.sh
index 1a501ee09e..bae2419150 100755
--- a/t/t6120-describe.sh
+++ b/t/t6120-describe.sh
@@ -107,7 +107,8 @@ test_expect_success 'describe --contains defaults to HEAD without commit-ish' '
check_describe tags/A --all A^0
test_expect_success 'renaming tag A to Q locally produces a warning' "
- mv .git/refs/tags/A .git/refs/tags/Q &&
+ git update-ref refs/tags/Q $(git rev-parse refs/tags/A) &&
+ git update-ref -d refs/tags/A &&
git describe HEAD 2>err >out &&
cat >expected <<-\EOF &&
warning: tag 'Q' is externally known as 'A'
@@ -135,7 +136,8 @@ test_expect_success 'abbrev=0 will not break misplaced tag (2)' '
'
test_expect_success 'rename tag Q back to A' '
- mv .git/refs/tags/Q .git/refs/tags/A
+ git update-ref refs/tags/A $(git rev-parse refs/tags/Q) &&
+ git update-ref -d refs/tags/Q
'
test_expect_success 'pack tag refs' 'git pack-refs'