mirror of
https://github.com/tj/git-extras.git
synced 2026-09-10 15:36:21 -04:00
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
18 lines
360 B
Bash
Executable file
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
|