about summary refs log tree commit diff
path: root/third_party/git/t/lib-t6000.sh
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/git/t/lib-t6000.sh')
-rw-r--r--third_party/git/t/lib-t6000.sh5
1 files changed, 2 insertions, 3 deletions
diff --git a/third_party/git/t/lib-t6000.sh b/third_party/git/t/lib-t6000.sh
index b0ed4767e320..fba6778ca35a 100644
--- a/third_party/git/t/lib-t6000.sh
+++ b/third_party/git/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