As an example, when serching for non-existent branch named mybranch,
mybranch.orig would match, and result in an error trying to erase
non-existent branch mybranch.
Fix by matching to the end of the line "$".
Signed-off-by: Hugo Villeneuve <hugo@hugovil.com>
patches_branch="b4/${name}"
fi
-if git branch | grep -q ${patches_branch}; then
+if git branch | grep -q -e "${patches_branch}$"; then
git branch -D ${patches_branch} 1>/dev/null
fi
# Create temporary branch for compilation, based on compile_branch:
temp_compile_branch="${patches_branch}_compile"
- if git branch | grep -q ${temp_compile_branch}; then
+ if git branch | grep -q -e "${temp_compile_branch}$"; then
git branch -D ${temp_compile_branch}
fi