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 3BF1DA0C44; 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 BF7BA4067A; Mon, 14 Jun 2021 16:16:25 +0200 (CEST) Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) by mails.dpdk.org (Postfix) with ESMTP id 509414003F for ; Mon, 14 Jun 2021 16:16:24 +0200 (CEST) Received: from mail-qt1-f197.google.com ([209.85.160.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-0001TO-0A for dev@dpdk.org; Mon, 14 Jun 2021 14:16:24 +0000 Received: by mail-qt1-f197.google.com with SMTP id z4-20020ac87f840000b02902488809b6d6so7518664qtj.9 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=mJwwoP5kPyWjl56O/wL9skE3RpBGhSIWoh2AxMIXWy6kLJGqmq8Kd/dcF3GDCTnLFP uQfwUeBm9EtEIPtkyFpjCQM68mga+Fi3cAjyseqPZ5HNiJeKCZrRkFhf3aHcOYRVhS1Z jLYlrpX6TmavLGjqRu11TQYDmbeG0wnaKumlATsstydjZQKCbDCMOEh7WWf8G2WoxjX4 LzzNI9isNuLc6Efg4VF/dugUDsnnuScRnGGHr5veAUwTVUibbMqvj58r7RRpGGJ7iZWs oER6uko2kMVFzHXPPQwo110YdxKKmpOkqAnB8cEV1QqOBFGjfBxKaVdP8VzvXYLGjoph EM3A== X-Gm-Message-State: AOAM530nhl+r7GOhofE3bA3GRJ0NowpOjyF4y1GG6nuNaPMo8VLwcmdu 8zlixFf5r+gnDTaKZYYlSxJytek6Q/zNwIo2JIoH1sjpppdazfGH2CUoOALdCgp5xg9Nij/4u1q CwoSgt9RGd02+1hFq1FX+lLj/aweNZyVGbKkO X-Received: by 2002:ac8:7768:: with SMTP id h8mr16495914qtu.235.1623680183148; 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-dev] [PATCH 2/2] devtools: auto detect branch to search fix patches X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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