tj.git-extras/bin/git-delete-tag
Todd Wolfson 9b787421e7 Added multi-delete for git-delete-branch and git-delete-tag
Correcting typos
Compiled latest documentation
Applying changes from delete-tag to delete-branch for consistency
Removed unnecessary string quotes (thanks `git` ref design) and everything works
Tags are not being found with string concatenation
Updated delete-tag to accept multiple tags
Corrections for delete-branch
Updating docs for delete-tag
Added 'Todd Wolfson' to AUTHORS
Updated documentation for delete-branch
Moved deletions to concatenate strings and delete in one fell swoop
Reworking delete-branch to delete multiple branches in series
2013-09-15 14:40:35 -07:00

18 lines
360 B
Bash
Executable file

#!/bin/sh
# Assert there is at least one tag provided
test -z $1 && echo "tag required." 1>&2 && exit 1
# Concatenate all the tag references
local_tags=""
origin_refs=""
for tagname in "$@"
do
local_tags=$local_tags" $tagname"
origin_refs=$origin_refs" :refs/tags/$tagname"
done
# Delete all the tags
git tag -d $local_tags
git push origin $origin_refs