Require a space after the tag name, otherwise searching for tag=foo might
match a line

        #tag:foobar ...

Fixes: 957c6c663cdd ("git-ptx-patches: Allow patches before base tag")
Signed-off-by: Uwe Kleine-König <u.kleine-koe...@pengutronix.de>
---
 scripts/git-ptx-patches | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/git-ptx-patches b/scripts/git-ptx-patches
index b52817399d45..8bf1731aeb53 100755
--- a/scripts/git-ptx-patches
+++ b/scripts/git-ptx-patches
@@ -73,7 +73,7 @@ while getopts "aft:n" opt; do
 done
 shift $((${OPTIND} - 1))
 
-tag2=$(grep "#tag:" .ptxdist/series | awk "/#tag:${tag}/{if (getline) print 
\$1}" | sed 's,#tag:,,')
+tag2=$(grep "#tag:" .ptxdist/series | awk "/#tag:${tag} /{if (getline) print 
\$1}" | sed 's,#tag:,,')
 range="${tag}..${tag2}"
 
 if "${all_tags}" ; then

base-commit: 5b07b31b850e69493e4fd7bd4fa46501ee92684a
-- 
2.35.1


Reply via email to