From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 13 May 2022 09:50:14 +0200 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1npQ3y-00BkLo-6a for lore@lore.pengutronix.de; Fri, 13 May 2022 09:50:14 +0200 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1npQ3w-00007X-Ug; Fri, 13 May 2022 09:50:12 +0200 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1npQ3c-00007H-Jo; Fri, 13 May 2022 09:49:52 +0200 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1npQ3d-0022QN-1s; Fri, 13 May 2022 09:49:51 +0200 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1npQ3b-009PUR-4d; Fri, 13 May 2022 09:49:51 +0200 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: ptxdist@pengutronix.de Date: Fri, 13 May 2022 09:49:44 +0200 Message-Id: <20220513074944.262539-1-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [ptxdist] [PATCH] git-ptx-patches: Fix corner case when searching for a tag in series file X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false 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 --- 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