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 054C7A054A; Tue, 25 Oct 2022 12:15:54 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ED522427FF; Tue, 25 Oct 2022 12:15:53 +0200 (CEST) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2062.outbound.protection.outlook.com [40.107.92.62]) by mails.dpdk.org (Postfix) with ESMTP id 84D5D41143 for ; Tue, 25 Oct 2022 12:15:52 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aB+BvTNPRYmVmtZ5WIF4DjYPcA1YNFp2ccdRkIog1l/bAuRHUuYwtn84T4CoafA8fLJ/jUX+0lac2sxABxk2kCqf36EfILiwJ/kPAjByt7vvGubLxhH72zZVemwZaGSA+Lu/O2YEJIfbgamzkVO6G4E3K98IBe5mdxmiHu1nMqNXav6acHUIhKHf1eUOCbQZGJgsrv3boWnwh2aFZkHaW31cAsOvVCQ2myyscruRozIHWXziq3ZiadcjxgFtiO6GMnXOnlVhMpo/4lClL4GgM54XR81ZjnEXSmNgmUVlqKxyZX/QLEs8jjRzNpK7jExG57xY1XNN7vyMykUZlR22Pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=kseWA2NRLyOvlkjK3eCzKv1yiAgzsZWO4GIBp1t67dg=; b=Ci/7r+AcFaHkOvhWfEWWphMf8TSFNwBHsnDvjUiEabVwYSCGu9Ct8+tRpi46P2qXKMJCGZzIHUuxKHCsjtSJDtNrkS0V8FyM3etQeyq8C9/npmeniqGvQNb2qteMvgJGsp8FZgOPgu13VDr3bMMogYBr0FIwc0+NXxWLTLuqPBdo+0W+moNSYOgd11YQkyfKtb7hmBRIzS+ZMblnY4/QhM4ZCbs9nWwjwXAh9hF0/fcfnDxunT+T7DnG1ew5dKXm8X894l+JIQ7J2rU8rtEr1F54XBY6cy848i3FxT1n/hYMUBAayv1rCXvYC4CSNfeUo4pWHMzu50yeKKsnnPKLOg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kseWA2NRLyOvlkjK3eCzKv1yiAgzsZWO4GIBp1t67dg=; b=RlFX9NEkUx1yYcFsWXX6Ll/fwScxS+fAgQwZWvQCq/BmVpGEuVgxURIEAV2/RFQPyky64gupTeG750GnYm28X8TprnM0leMv86kB5X77p4/g8WpB1YoE4HAsF42pzW63W/arnKcLFNW4gnWODwwDN7NR/ex2947yvvwhOr5vwV9FM1VaQ0Wzui4yC2hysKC5MQmn8Bt4vtKEharO4hh7Hhk78zjBuZok6umLsj5dAw0PkgSMUZt73lhOhSYfWhsVV4u/K8iuRjkAASOM1GsmRXrKVydcNX1Y1MLGeY/ccltk/yObV050pfcUFy8lf/QgZ7dzjiBWje/d5ff8PSLwVQ== Received: from DS7PR05CA0043.namprd05.prod.outlook.com (2603:10b6:8:2f::22) by SA0PR12MB4415.namprd12.prod.outlook.com (2603:10b6:806:70::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.28; Tue, 25 Oct 2022 10:15:51 +0000 Received: from DM6NAM11FT105.eop-nam11.prod.protection.outlook.com (2603:10b6:8:2f:cafe::cf) by DS7PR05CA0043.outlook.office365.com (2603:10b6:8:2f::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.8 via Frontend Transport; Tue, 25 Oct 2022 10:15:51 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by DM6NAM11FT105.mail.protection.outlook.com (10.13.173.164) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.16 via Frontend Transport; Tue, 25 Oct 2022 10:15:50 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Tue, 25 Oct 2022 03:15:41 -0700 Received: from nvidia.com (10.126.230.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.29; Tue, 25 Oct 2022 03:15:40 -0700 From: Ali Alnubani To: CC: , Thomas Monjalon Subject: [PATCH v2] devtools: check for supported git version Date: Tue, 25 Oct 2022 13:15:12 +0300 Message-ID: <20221025101512.3190439-1-alialnu@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221024153706.3117107-1-alialnu@nvidia.com> References: <20221024153706.3117107-1-alialnu@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT105:EE_|SA0PR12MB4415:EE_ X-MS-Office365-Filtering-Correlation-Id: 2a396d35-4a97-4b2a-d4d1-08dab671e4b3 X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: K0/sEyKYhouTcFxALskVt7gpTccWFWRS3eAtQ0UXOsx6vE6i/JN8CPW6Z+GSWdvDbyNWdFBa138mj0eXIGN4tlc46TwVQ0aB3y8znYWt54mSn1Yjm9Q580t5oq18CcUbdjuikR5Ufl6BWSlBo7b1QyhuTtjvyRVOQMZegsfYhwSpFC9M9dkWJXqLqj7sB6eKIvLUAsaCFwzntGxrBf7VNJK+uvfhMoB95Kyws857YsfXTkIDSsSzQ7gAVxAgU0mG1oEBnuSrKA100D5DVfk6oMouixuA/LLm98InTRKp6FXYPXgdOdIRWSmUL3ZbqMREcyQFhqTht2tV/1L1/7wAPp/CiRkRG4zYdjjKJUQWZ0el0H1i+K9f+3YOF4tG1b1K5JzYY+2CDWmck0q59S86aX5Pzy1aWZOTyeXppH7yGsrVM/DGx8k4ShzY2HXSMxWhUpl2lEfsfUoou2MRos+JDtZT6gJL1mI4C42vqCpT/hPpco8h6REYUl7bGUs2AZcycTMP7eYpdDAWm2RNvLvhnZsywRJQf1ul6r8OtE3dMFpjU8CHJCVmNnya2Rf9QWVcNGaKaQYPKKluATKa5et/JQjuy/LF3P7wtkt4xJmVqAwBhCdufOV7HNR8C2AcbHNUrgppLEqRrHEVgMPXQzCNsXexqXSC7F24kISyAAXoFyfBUYYoT5FJeS44lICNyeityWV0W+zg3GWZoCxWoctTcuPf7xJA291OvRP/aU4HEAvk+Wq73F6pPCy1pJvM39T+RpkvP7KJoO/GaBpibrEFLoaj6dZiBXSQ08k+F9LWSvfzUUPvCMWRw/2/sugN/0r0fXYt8NCrMJnf26LqLUw0vrOKTJ8GuO96W9AE2406/KI= X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230022)(4636009)(396003)(136003)(39860400002)(346002)(376002)(451199015)(46966006)(36840700001)(40470700004)(2906002)(8676002)(70206006)(8936002)(70586007)(36756003)(41300700001)(40460700003)(36860700001)(478600001)(966005)(316002)(54906003)(6916009)(5660300002)(4326008)(47076005)(426003)(83380400001)(186003)(7696005)(6666004)(82310400005)(336012)(2616005)(1076003)(16526019)(7636003)(40480700001)(356005)(55016003)(82740400003)(26005)(86362001)(6286002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Oct 2022 10:15:50.9334 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2a396d35-4a97-4b2a-d4d1-08dab671e4b3 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT105.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR12MB4415 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 The script devtools/parse-flow-support.sh uses the git-grep option (-o, --only-matching), which is only supported from git version 2.19 and onwards.[1] The script now exits early providing a clear message to the user about the required git version instead of showing the following error messages multiple times: error: unknown switch `o' usage: git grep [] [-e] [...] [[--] ...] [..] [1] https://github.com/git/git/blob/v2.19.0/Documentation/RelNotes/2.19.0.txt Signed-off-by: Ali Alnubani Signed-off-by: Thomas Monjalon --- Changes in v2: - Refer to filename by $0 (Suggested by David Marchand). devtools/parse-flow-support.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/devtools/parse-flow-support.sh b/devtools/parse-flow-support.sh index 63c0b20e23..9811c7881c 100755 --- a/devtools/parse-flow-support.sh +++ b/devtools/parse-flow-support.sh @@ -13,6 +13,12 @@ if [ -z "$dir" ]; then exit 1 fi +# test git-grep for -o (--only-matching) option +if ! git grep -qo git -- $0 >/dev/null 2>&1; then + echo "git version >= 2.19 is required" >&2 + exit 1 +fi + # sorting order export LC_COLLATE=C -- 2.25.1