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 39EF0A0542; Mon, 24 Oct 2022 17:37:58 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1C33B41143; Mon, 24 Oct 2022 17:37:58 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2040.outbound.protection.outlook.com [40.107.94.40]) by mails.dpdk.org (Postfix) with ESMTP id 04FEC40A8B for ; Mon, 24 Oct 2022 17:37:56 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oDpsBz4NSSSn+fKK8MqBZh+G5XK+GQZKTd1QRBCqXhuDLjqOWd7BY0oTvObWqUVIHMU72dlrzLKl63horrLkHURVRfNs+4XoD0Bj4o877nC9GMQedXWe2l30aFya4Xrp6Uq8C6ksGk5icXQ/sWhFHMX/nOyUUkUzvS2WXZHuyZheQ0aLmER3ATgTg0dSblKv8qukTGjqeXU0yXKp7rS/GQIvkRX+Bk0MTVWxy/OYT+lmOysTT2ZoX7co8s+e8BEEthlVQFdfxoaZpROldHxj6vqBzZiTzXee59f+IWUF0BhVQ1E7Z0kFYe6EucyTiSDLeLpJrHxDiwIHBBJNeJPwNQ== 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=sUghfHrt6eguQZbcS8gfykiTTSs1Ks0nhxKYB3DO3NY=; b=NC6QkqFNEEuaNJjKlFa7ve02L/mQXdaNKZAumbQFk2Jj2Oef7B0FnDTpIcA6Doal4AGAOISx2xkS+Os/jZbDap7AqVW/nI9/YwFyqfLtsrwBBikuTB9++dycNOlYLIY1ZzvpMC1I4Z+KzjPIwql5qttTVbclE2ZTfhXzrZQXkA2qO67uh399WOYqgq2RWZR02xUvrPqWhUAvdWEYgCUAVPrQ/DPj9bRFW0bSBu5Gn8B1I0Lk1PfhZKezvtpBbUux1aYSYs8PlIobWMMue8eYYmBid5orXVbJASRnW1HPTLVhB6Z6hpdOP2waNunKPkqJlbrSNG3FM/mwE/ifbESQDA== 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=sUghfHrt6eguQZbcS8gfykiTTSs1Ks0nhxKYB3DO3NY=; b=jzguyCTGSpzVvz614I+a2bzAAlLamXOtarxYlWEqIepR8ddVpnSvxD4pk6D5VlFNVDG4Tz4PPzQB03Z9ziypGvrwRn8zelKy7soMggFIKhPq/Y/DkaDr3rpmt/AFEUT+G9bmxXnAvUWL0HZPOGUJ3mJKI6BQofaREURjdFVhBZ3GBE01qIW2Kk6mZ21oc9CxaxKx6PTTASbt/UDN6Kyvz3gH24yZylMHFrBGVXRLSPECxpwF3278kgM1CYEmKqn9nOM0h30Bu56HohyM0e/MwqtRFWULemfIsxtenIfuqBpeHN9v4kJpFPqwhaUWNrmQINvRgi8W7zwDeDWNU/7OnQ== Received: from MW4PR04CA0166.namprd04.prod.outlook.com (2603:10b6:303:85::21) by BL3PR12MB6474.namprd12.prod.outlook.com (2603:10b6:208:3ba::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.30; Mon, 24 Oct 2022 15:37:54 +0000 Received: from CO1NAM11FT052.eop-nam11.prod.protection.outlook.com (2603:10b6:303:85:cafe::a2) by MW4PR04CA0166.outlook.office365.com (2603:10b6:303:85::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.26 via Frontend Transport; Mon, 24 Oct 2022 15:37:53 +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 CO1NAM11FT052.mail.protection.outlook.com (10.13.174.225) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.16 via Frontend Transport; Mon, 24 Oct 2022 15:37:53 +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; Mon, 24 Oct 2022 08:37:42 -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; Mon, 24 Oct 2022 08:37:41 -0700 From: Ali Alnubani To: CC: Thomas Monjalon Subject: [PATCH] devtools: check for supported git version Date: Mon, 24 Oct 2022 18:37:06 +0300 Message-ID: <20221024153706.3117107-1-alialnu@nvidia.com> X-Mailer: git-send-email 2.25.1 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: CO1NAM11FT052:EE_|BL3PR12MB6474:EE_ X-MS-Office365-Filtering-Correlation-Id: 118d22ef-a415-4149-4996-08dab5d5b76b 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: 3J1+aJDAOAf0ni1jCdR1GhUBQcVoThPIrTTHkE8nHjQo3OXma+EY9gHizHL8QUK1PXxfrfbYriBabgGRatfFFGiQYvOCl7nw75abeSa1bQ94YOI/9pBvfIFO+ZPiHondZ/0rSFk0ZtHWun9+bB4hJpbHuuycoGZCZFmh4CuP17vwHu9IkOBzxHXg6iSr3pavPhqjVvPY4s0p6ayHmR55cva7ngBNFxRhWbuNhun3JYKd2NrIRM/LnYABsPHr8PQev/thzcn1oNTmm3I+rHOvHjwC8Iq9Ma6lN/dbHDI0ZWpFSOhTUsQm/mX+p/LG7YW+PvKXkYmKGAoVhSejS6Jkg143LcUq0iookh0510HxkaUrXnCg7nK1kDMPzd+JoPHSueKOEK6NaQu4/O5J+WiemF0MeFjR+7GIiSIyi40pEKmnFQXp64/HG+HDj+3Wiw5S6hlqRCfucNn6E0MH1lUntcAlJB6RZgLVj0GqTQv/cGPM16W7g011i2aD6UDcLjdrZVjQvhY441w1M5ut8sd0OT5JSthDKvA+9c8sGlcucwJBUne6gDNe3KDhey90NdsH2Td7jmaVCEf7WLfKLxMOn7/kPRPt4nIIK+p4OtzAEXaDtMfriwWfiig3UTQI+MoFbV99TmyTc6kR1mihPzSMfqoCLy5tgLPV4Gu4xqg9V9KE2Oev4LpttbRKnF0Oa7ZhtatSRDBl0W7bkIe34GDe04H+VdYlRzzKd3XgdIS69bB910HP9zzV6ePaXTcvEd5dfGLSG7pl9Jbev5ya7XteS3VHKRa5ecmEvftdNwd5ioaMfa5b26pVO5eFxfH5X8m+0DbH0Lcjiu9P25X3Z4zsz7Vy4XQeAopdB7XjT7o567A= 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)(376002)(136003)(39860400002)(346002)(451199015)(36840700001)(40470700004)(46966006)(7636003)(82310400005)(356005)(478600001)(86362001)(966005)(82740400003)(36860700001)(40480700001)(41300700001)(36756003)(2616005)(40460700003)(7696005)(1076003)(16526019)(316002)(6916009)(336012)(70586007)(186003)(47076005)(4326008)(2906002)(8676002)(26005)(426003)(70206006)(5660300002)(55016003)(6666004)(6286002)(8936002)(83380400001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Oct 2022 15:37:53.4707 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 118d22ef-a415-4149-4996-08dab5d5b76b 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: CO1NAM11FT052.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL3PR12MB6474 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 --- 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..9c322249da 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 -- devtools/parse-flow-support.sh >/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