From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Wed, 25 May 2022 11:46:36 +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 1ntnbA-008VGp-Gj for lore@lore.pengutronix.de; Wed, 25 May 2022 11:46:36 +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 1ntnb9-0001Ng-UD; Wed, 25 May 2022 11:46:35 +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 1ntnZq-0007Eu-OU; Wed, 25 May 2022 11:45:14 +0200 Received: from [2a0a:edc0:0:1101:1d::39] (helo=dude03.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1ntnZr-004RBA-B9; Wed, 25 May 2022 11:45:13 +0200 Received: from mol by dude03.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1ntnZo-00BwEm-Vi; Wed, 25 May 2022 11:45:13 +0200 From: Michael Olbrich To: ptxdist@pengutronix.de Date: Wed, 25 May 2022 11:45:12 +0200 Message-Id: <20220525094512.2845413-1-m.olbrich@pengutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220513074944.262539-1-u.kleine-koenig@pengutronix.de> References: <20220513074944.262539-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: Re: [ptxdist] [APPLIED] 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 Cc: =?UTF-8?q?Uwe=20Kleine-K=C3=83=C2=B6nig?= 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 Thanks, applied as 275b871226d711f2a4318a600b824803e3976db3. Michael [sent from post-receive hook] On Wed, 25 May 2022 11:45:12 +0200, Uwe Kleine-König wrote: > 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 > Message-Id: <20220513074944.262539-1-u.kleine-koenig@pengutronix.de> > Signed-off-by: Michael Olbrich > > 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