Skip to content

Commit

Permalink
fixes nvie#148: use explicit matching to perform string matches
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel García committed Oct 6, 2017
1 parent 15aab26 commit 97995a1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion gitflow-common
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,14 @@ escape() {
# set logic
has() {
local item=$1; shift
echo " $@ " | grep -q " $(escape $item) "
for s in $@; do
if [ "$item" = "$s" ]; then
return 0
fi
done
return 1
# the following code has issues with + in the branch names
# echo " $@ " | grep -q " $(escape $item) "
}

# basic math
Expand Down

0 comments on commit 97995a1

Please sign in to comment.