From: Hugo Villeneuve Date: Mon, 23 Mar 2026 20:30:14 +0000 (-0400) Subject: hvsp: fix bug when grepping branch names X-Git-Url: http://gitweb.hugovil.com/sitemap.xml?a=commitdiff_plain;h=21f01386b43722237e32b84c0d8c8b578829904e;p=hvutilities.git hvsp: fix bug when grepping branch names 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 --- diff --git a/scripts/kernel-send-patches.sh b/scripts/kernel-send-patches.sh index d7b34ef..75b0cc9 100755 --- a/scripts/kernel-send-patches.sh +++ b/scripts/kernel-send-patches.sh @@ -313,7 +313,7 @@ else 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 @@ -433,7 +433,7 @@ EOF # 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