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
path: root/t
diff options
context:
space:
mode:
authorHan-Wen Nienhuys <hanwen@google.com>2020-06-30 15:05:35 +0300
committerJunio C Hamano <gitster@pobox.com>2020-07-07 07:38:32 +0300
commit9e35a6a9865c3c9bc5b8908dcdd3a9a818612a6a (patch)
tree2580ea08a4b9b6b7e8a58bde28a6315a7aa5fe27 /t
parenta08a83db2bf27f015bec9a435f6d73e223c21c5e (diff)
lib-t6000.sh: write tag using git-update-ref
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rw-r--r--t/lib-t6000.sh5
1 files changed, 2 insertions, 3 deletions
diff --git a/t/lib-t6000.sh b/t/lib-t6000.sh
index b0ed4767e3..fba6778ca3 100644
--- a/t/lib-t6000.sh
+++ b/t/lib-t6000.sh
@@ -1,7 +1,5 @@
: included from 6002 and others
-mkdir -p .git/refs/tags
-
>sed.script
# Answer the sha1 has associated with the tag. The tag must exist under refs/tags
@@ -26,7 +24,8 @@ save_tag () {
_tag=$1
test -n "$_tag" || error "usage: save_tag tag commit-args ..."
shift 1
- "$@" >".git/refs/tags/$_tag"
+
+ git update-ref "refs/tags/$_tag" $("$@")
echo "s/$(tag $_tag)/$_tag/g" >sed.script.tmp
cat sed.script >>sed.script.tmp