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 D5C32A0C45 for ; Mon, 14 Jun 2021 16:16:26 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BEF734068E; Mon, 14 Jun 2021 16:16:26 +0200 (CEST) Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) by mails.dpdk.org (Postfix) with ESMTP id 57FDE4067A for ; Mon, 14 Jun 2021 16:16:24 +0200 (CEST) Received: from mail-qk1-f197.google.com ([209.85.222.197]) by youngberry.canonical.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1lsnO4-0001TR-14 for stable@dpdk.org; Mon, 14 Jun 2021 14:16:24 +0000 Received: by mail-qk1-f197.google.com with SMTP id x4-20020a3763040000b02903ab95237c25so6468915qkb.0 for ; Mon, 14 Jun 2021 07:16:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8OyTJnhVN0Wu0kEVDK4JF1uR8W48DotRtviERslcq5E=; b=NNoo6zXmS4cRosKdQpVq+DA6aQDhwSWM/ooZWuA0VxuUCvvxbhpqC3H2O5Le+1+Om+ 1sjDHRWVSeLWdKPzf5KD3lCZi28NUX4KIB7LgiuvryhUi8/1oNBUzRuBBzZT7rerCnOC r0brlebwQNAcSjGOOxn0nMVNtwn5eWQAUPJQS6y2pr87WSj7pw1tWNFvZfHhVNXrGmI3 ALK8rb5BB2A6IGv0AQJ7szQAId1g4jTwWCuDli78WYAC8hvqD2bkCVlm31O0AOVn8Fru Ykuf66+863HTfkLuPyOOYFhXaM4Y72M4BykEur8V6BmnVLnTiHinzPdDNBu3yLT6SUqy isZw== X-Gm-Message-State: AOAM530m2LAhRvftA5jw8tpUtDpE7M+ofFOauhTC7qRQzF8NVWUDj0/o ErNzA91Fi6PirqRq/ZzlwxUbqQ2iONo+3wb6uHNgBFN7JDQyWPEI0CpkSbrmhCdppr6zedvWKzL 0zLc3o4Z89FpSNzDHE9K4I3OpSmnNJLZwp4wLLA1e X-Received: by 2002:ac8:7768:: with SMTP id h8mr16495915qtu.235.1623680183149; Mon, 14 Jun 2021 07:16:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw2UBELj7/eJtEhM2RUmSQ03J692046vWV/KZRzamjXPjznUsqNbf6bpmMU7hPoQ4TwCtXKIsJ06VhP763T2Eg= X-Received: by 2002:ac8:7768:: with SMTP id h8mr16495890qtu.235.1623680182834; Mon, 14 Jun 2021 07:16:22 -0700 (PDT) MIME-Version: 1.0 References: <20210612135628.20460-1-xuemingl@nvidia.com> <20210612135628.20460-2-xuemingl@nvidia.com> In-Reply-To: <20210612135628.20460-2-xuemingl@nvidia.com> From: Christian Ehrhardt Date: Mon, 14 Jun 2021 16:15:57 +0200 Message-ID: To: Xueming Li Cc: dev , Luca Boccassi , Thomas Monjalon , dpdk stable , Yuanhan Liu Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-stable] [PATCH 2/2] devtools: auto detect branch to search fix patches 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" On Sat, Jun 12, 2021 at 3:57 PM Xueming Li wrote: > > Current fix scan scripts scanned specified range in current(HEAD) > branch. When users run it in a earlier branch, few patches were ^^ typo missing "an" (if you care) > scanned. > > This patch auto etects branch to scan from range. ^^ typo missing "d" (if you care) > > Fixes: 752d8e097ec1 ("scripts: show fixes with release version of bug") > Cc: Thomas Monjalon > Cc: stable@dpdk.org > Signed-off-by: Xueming Li > --- > devtools/git-log-fixes.sh | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/devtools/git-log-fixes.sh b/devtools/git-log-fixes.sh > index 5fc57da913..9a8a9d6739 100755 > --- a/devtools/git-log-fixes.sh > +++ b/devtools/git-log-fixes.sh > @@ -34,13 +34,15 @@ done > shift $(($OPTIND - 1)) > [ $# -ge 1 ] || usage_error 'range argument required' > range="$*" > +range_last=$(git log --oneline v21.05-rc3..v21.05 |head -n1|cut -d' ' -f1) Instead of these values that would need to be dynamic to be generally reliable right? Everyone might need something different. I thought about the same and wondered if this script should get a new optional argument. If passed it will use this new argument instead of $refbranch That would allow any user today to be able to continue to use it as-is and anyone else can for reliable behavior define the branch to look in. > +# use first branch > +refbranch=$(git branch --contains $range_last -r --sort=-authordate |head -n1) > > # 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) > local tag=$( (git tag -l $VER --contains $1 --sort=creatordate --merged $refbranch 2>&- || > # tag --merged option has been introduced in git 2.7.0 > # below is a fallback in case of old git version > -- > 2.25.1 > -- Christian Ehrhardt Staff Engineer, Ubuntu Server Canonical Ltd