Skip to content

Commit

Permalink
Fixed require_tag_absent to not break when the list of tags contains …
Browse files Browse the repository at this point in the history
…an ambiguous entry, e.g. looking for "1.0.1" in "0.1.0 0.1.1 0.1.2 1.0".
  • Loading branch information
jezdez committed Mar 28, 2011
1 parent baf66be commit 8f280e0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions gitflow-common
Original file line number Diff line number Diff line change
Expand Up @@ -288,9 +288,11 @@ require_branch_absent() {
}

require_tag_absent() {
if has $1 $(git_all_tags); then
die "Tag '$1' already exists. Pick another name."
fi
for tag in $(git_all_tags); do
if [ "$1" = "$tag" ]; then
die "Tag '$1' already exists. Pick another name."
fi
done
}

require_branches_equal() {
Expand Down

0 comments on commit 8f280e0

Please sign in to comment.