{"thread":{"id":"5780","subject":"[PATCH] Use git-update-ref to delete a tag instead of rm()ing the ref file.","startedAt":"2006-10-01T20:16:22Z","lastAt":"2006-10-01T20:16:22Z","messageCount":1,"participants":["Christian Couder"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"28082","messageId":"20061001221622.0f68b471.chriscool@tuxfamily.org","threadId":"5780","inReplyTo":null,"subject":"[PATCH] Use git-update-ref to delete a tag instead of rm()ing the ref file.","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2006-10-01T20:16:22Z","receivedAt":"2006-10-01T20:16:22Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"Signed-off-by: Christian Couder <chriscool@tuxfamily.org>\n---\n git-tag.sh |    6 ++++--\n 1 files changed, 4 insertions(+), 2 deletions(-)\n\ndiff --git a/git-tag.sh b/git-tag.sh\nindex 2bde3c0..6463b31 100755\n--- a/git-tag.sh\n+++ b/git-tag.sh\n@@ -47,8 +47,10 @@ do\n     -d)\n     \tshift\n \ttag_name=\"$1\"\n-\trm \"$GIT_DIR/refs/tags/$tag_name\" && \\\n-\t        echo \"Deleted tag $tag_name.\"\n+\ttag=$(git-show-ref --verify --hash -- \"refs/tags/$tag_name\") ||\n+\t\tdie \"Seriously, what tag are you talking about?\"\n+\tgit-update-ref -m 'tag: delete' -d \"refs/tags/$tag_name\" \"$tag\" &&\n+\t\techo \"Deleted tag $tag_name.\"\n \texit $?\n \t;;\n     -*)\n-- \n1.4.2.1.g8a7b-dirty\n"}]}