From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2D7E8A0C47 for ; Sun, 8 Aug 2021 13:24:51 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1D2DF41160; Sun, 8 Aug 2021 13:24:51 +0200 (CEST) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by mails.dpdk.org (Postfix) with ESMTP id CFC444067E; Sun, 8 Aug 2021 13:24:48 +0200 (CEST) Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 3C01D5C00C1; Sun, 8 Aug 2021 07:24:48 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Sun, 08 Aug 2021 07:24:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm1; bh= 5g1PMvG3ICUPnCit4H7B8nOuHxo/7pzmCvNhzYxBT1o=; b=CoMfsp1tWOj9bKm2 mlPrgS7YOMa8sAB8h38/G1nmYgbzlZOFRvJxpAvObS5bl5HFxeIy+TXQas1RruzR IHWpwLbNVWPejkeLu407GrYNkGdynL0jyIdIvp+a7HnOZFbnjPXoUXKLEaqvcezt sGZJSOPjeXkXLB/7lSLf4JHKlZn0GCL30izQcVQOpfyM60nAG0tFZfT4UeSnULhf Ux+RUzKX8BCz65QA6mQsL9lYpVRGYnZEEk+CIkk5HsX7mth3b/ktguuJ8pnYWQyT UFEcNbTZTDWAEpYookwTg8SzOaHrynjntqd7hh2/agslR4xxk1eJHORUD8/AWA0W PZHcLQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=5g1PMvG3ICUPnCit4H7B8nOuHxo/7pzmCvNhzYxBT 1o=; b=T3bvYFTEhRioAV1q0k3s3hbO5FIGXyOxDRMHTHFQ+NWOHwvRV6WcdASaE qlWMFWl41suGiTo5v/pbxl4VGt9HiR/jpb3QBKhbMzypepBI4HG2H2wLQAu52HQI SkFlBbF2sWchqnqhZ6vXjIt1ET/iYduru6UigsWheTQJctVsSGdswH840URPkJuS 6ymQtNPR6XZWMojm5VM5THQ5OfNaRpoKvAbrwNjsoZeh03/aDAZXrOx6vmfWaz52 pnEWlCjY3emcSVzzwRQGFuBnLerh/uUM0XMbY7RECEBeYPBR89x8v75dfl5krc+1 4QUVdlyf324LVneEBX72q4YDog2LQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrjeehgdegtdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucggtf frrghtthgvrhhnpedugefgvdefudfftdefgeelgffhueekgfffhfeujedtteeutdejueei iedvffegheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 8 Aug 2021 07:24:46 -0400 (EDT) From: Thomas Monjalon To: Xueming Li Cc: dev@dpdk.org, stable@dpdk.org, Christian Ehrhardt , bluca@debian.org, ktraynor@redhat.com, david.marchand@redhat.com Date: Sun, 08 Aug 2021 13:24:44 +0200 Message-ID: <5756416.oaEARKiDCu@thomas> In-Reply-To: <20210630063416.9550-2-xuemingl@nvidia.com> References: <20210616040324.311461-1-xuemingl@nvidia.com> <20210630063416.9550-1-xuemingl@nvidia.com> <20210630063416.9550-2-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-stable] [PATCH v2 2/2] devtools: fix patches missing if range newer than HEAD X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 30/06/2021 08:34, Xueming Li: > Current fix scan scripts scanned specified range in HEAD branch. I cannot parse the above sentence. > When users ran it in an earlier branch, few patches were scanned > due to the fixes in the range are newer and not merged to HEAD > branch. You mean some patches were not scanned? > > This patch introduces optional argument, default to HEAD > if not specified. Checks the specified in parameter must > being merged in . Cannot parse either. > Fixes: 752d8e097ec1 ("scripts: show fixes with release version of bug") > Cc: Thomas Monjalon > Cc: stable@dpdk.org > Cc: Christian Ehrhardt > > Signed-off-by: Xueming Li [...] > - echo "usage: $(basename $0) [-h] " > + echo "usage: $(basename $0) [-h] []" [...] > -range="$*" > +range="$1" I think it breaks passing range in multiple parameters without quotes. But it is not really a problem. > +branch="$2" > + > +[ -n "$branch" ] || branch="HEAD" > +refbranch=$(git rev-parse --abbrev-ref $branch) Why this line is needed? A comment may help. If $branch is not used anymore, we can overwrite it instead of introducing one more variable $refbranch. > +range_last=$(git log --oneline $range |head -n1|cut -d' ' -f1) spaces missing around pipes. You can avoid "head" and "cut" by providing the right options to git. > +if ! git branch -a --contains $range_last |grep -q -e " $refbranch$" -e " remotes/$refbranch$"; then > + echo "range $range not included by branch $refbranch" > + exit 1 > +fi > > # get major release version of a commit > commit_version () # > { > local VER="v*.*" > # use current branch as history reference > - local refbranch=$(git rev-parse --abbrev-ref HEAD) You move a line but not its comment above.