From patchwork Tue Sep 18 23:29:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Peart X-Patchwork-Id: 10605019 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3A416161F for ; Tue, 18 Sep 2018 23:29:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 29C072BC53 for ; Tue, 18 Sep 2018 23:29:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1E4E02BC6A; Tue, 18 Sep 2018 23:29:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C35512BC53 for ; Tue, 18 Sep 2018 23:29:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730374AbeISFEc (ORCPT ); Wed, 19 Sep 2018 01:04:32 -0400 Received: from mail-by2nam03on0128.outbound.protection.outlook.com ([104.47.42.128]:52352 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726988AbeISFEc (ORCPT ); Wed, 19 Sep 2018 01:04:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Xm+7+TKUEy9NCG29kGnE5XDouWxEC13JOI5W6U3Tfpg=; b=A6OQ+4B1FGHca3wV7vb3tCzkBhpuVKKJsiRINAgsmkpX9hOEy1v+nlE0JFfgsG5QtqD+causAgZO6StBLeQV4Yl5wfZ65u8X3WxBbYJsFoPMaQyErCWLrndr2rdDIcnai1LOXhRr6X+8ZTYqRW1NUeY6KqTnJjfySFVRAkKqz3M= Received: from BL0PR2101MB0962.namprd21.prod.outlook.com (52.132.20.155) by BL0PR2101MB0994.namprd21.prod.outlook.com (52.132.23.156) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.1185.6; Tue, 18 Sep 2018 23:29:34 +0000 Received: from BL0PR2101MB0962.namprd21.prod.outlook.com ([fe80::f0b9:d24f:2522:d7be]) by BL0PR2101MB0962.namprd21.prod.outlook.com ([fe80::f0b9:d24f:2522:d7be%2]) with mapi id 15.20.1185.006; Tue, 18 Sep 2018 23:29:34 +0000 From: Ben Peart To: "git@vger.kernel.org" CC: "gitster@pobox.com" , "jrnieder@gmail.com" , Ben Peart , Ben Peart Subject: [PATCH v3 1/5] t/README: correct spelling of "uncommon" Thread-Topic: [PATCH v3 1/5] t/README: correct spelling of "uncommon" Thread-Index: AQHUT6d1MI5aRbUG3E+ITS7oh8pGrg== Date: Tue, 18 Sep 2018 23:29:34 +0000 Message-ID: <20180918232916.57736-2-benpeart@microsoft.com> References: <20180914143708.63024-1-benpeart@microsoft.com> <20180918232916.57736-1-benpeart@microsoft.com> In-Reply-To: <20180918232916.57736-1-benpeart@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [70.33.148.227] x-mailer: git-send-email 2.18.0.windows.1 x-clientproxiedby: BN6PR19CA0107.namprd19.prod.outlook.com (2603:10b6:404:a0::21) To BL0PR2101MB0962.namprd21.prod.outlook.com (2603:10b6:207:30::27) x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;BL0PR2101MB0994;6:hWcweXQx4hp03nfugywROZ673dZI8MQ7PSRjhEJuzrwHhng5UOM6qMF8KEiyHHCWrdrZEQbxSVfcjomA1k/8QdE52MtClLmjVZnfxSxXkKeloTa6V01SRJBKpmYEfIxJ50Iz/ipcsdyJYrPgKjTfQVRLGJEumb4wqlz1fCQeuceUNiiJ0cBd61OV7RBfRhME6aR81i8lotbbAqFAIlj64M50q4QozxbqJ7R+zHUupTFeKQTqikvAVJ7orVnVX+miGGb0pALTzDl5iYdDIHLdIeCWlRrMJU8+m3M2Wc/fI0iR+9HjYSr/nhdlCTahLmBg+ICnpBXqsJJ7J2w0Q2wpl0UNYtLC9TZ26C9eBCaLZhRR5pvhdkC3TBu8E1CsWsFt1MbNWy4tgl0e+h5vb4X32bmG3kIKzD1XjcrYSLqtudYBGjkeOlxbHbv3VwxSLuXubYDdu0ZJbiMpTBo93TKy/g==;5:Y1J+SedYr7CxdHsknNztlnLNzKG6014TX7MgLKYVJREPkVpvJMAyvLZDWh7V8orQK1OMKzmdLMkIczayc//Evtf9YsHHIe190oEDy+f4K+fcy/Y4LqZoAga9lvooMMqqqEaY6gZZG3Wo9LMlc/UM4rsCSnZcF9EdKGDzpMfpics=;7:tIsurVrvX0S3UgH4S9q5wLcil4C9jDJoxxnrnxgEwv9dc5LvfHpFwP5YpzkcGIP/pmf6l7KvZQt3C/BhXME8SMqbsImMu/U/C3qnravCNbN0rDvv420YGppG1MyY+MmRhLyE0a5XZazvGlSWRydIzyaMK2y2w9StFmzsD7dW5u2HZxQtO+ONh43mkFvNahTYaq8fWEr/0Qrg3E4xDUC8c0mzk6kQvfPnkipBA4VGQ0pV9mVzJ0QlxAfHd7zwwIbE x-ms-office365-filtering-correlation-id: 5c3e8876-7444-43a5-c578-08d61dbe9751 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(4534165)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7193020);SRVR:BL0PR2101MB0994; x-ms-traffictypediagnostic: BL0PR2101MB0994: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3002001)(10201501046)(3231355)(944501410)(52105095)(2018427008)(93006095)(93001095)(6055026)(149027)(150027)(6041310)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699050)(76991041);SRVR:BL0PR2101MB0994;BCL:0;PCL:0;RULEID:;SRVR:BL0PR2101MB0994; x-forefront-prvs: 0799B1B2D7 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(346002)(396003)(376002)(366004)(136003)(39860400002)(199004)(189003)(54906003)(14444005)(68736007)(2616005)(2906002)(86612001)(5640700003)(476003)(11346002)(256004)(6506007)(386003)(102836004)(8676002)(3846002)(6512007)(50226002)(36756003)(6116002)(446003)(316002)(486006)(6916009)(1076002)(2900100001)(8936002)(66066001)(10290500003)(5660300001)(81156014)(478600001)(1730700003)(72206003)(186003)(14454004)(99286004)(26005)(105586002)(52116002)(53936002)(2351001)(4326008)(81166006)(6486002)(2501003)(97736004)(107886003)(22452003)(76176011)(106356001)(5250100002)(6346003)(39060400002)(10090500001)(6436002)(305945005)(25786009)(7736002);DIR:OUT;SFP:1102;SCL:1;SRVR:BL0PR2101MB0994;H:BL0PR2101MB0962.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Ben.Peart@microsoft.com; x-microsoft-antispam-message-info: JZFghTqciR5Y20yyGCXeNN10w8m0gR7OspbBEcSywTAsAZAaJgmoRfvgU42sQck4xf6krDvUUQX8UFXIJm+2+fBkYPv1/quvLKVpuTBQhwmPJLkDN43F9mGpDg/aM/ZMoAG2bB70KWzsolpgCMZTUTFVhYe5OW/b8Tv+qRAtt3kNUJkw2SXKfFMfF5r49zVsfc48lVAnpyA+gPMaFYa+rJ48xvjbgMmDUeySUOLhD+awp5fP7THZjkMnczfGpyuN+UK3bw3L8FODOC2Si2S88dmZrOkaaB+6fXLy1WDvB+bcfQRd+6Za6xon+xjWBY8caP7sFNc5pfQyq75ES0rYGScdSmA4yrP0dCYvgRfb/gg= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5c3e8876-7444-43a5-c578-08d61dbe9751 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Sep 2018 23:29:34.3901 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR2101MB0994 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Correct a spelling error in the documentation for GIT_TEST_OE_DELTA_SIZE. Signed-off-by: Ben Peart --- t/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/README b/t/README index 9028b47d92..56a417439c 100644 --- a/t/README +++ b/t/README @@ -315,7 +315,7 @@ packs on demand. This normally only happens when the object size is over 2GB. This variable forces the code path on any object larger than bytes. -GIT_TEST_OE_DELTA_SIZE= exercises the uncomon pack-objects code +GIT_TEST_OE_DELTA_SIZE= exercises the uncommon pack-objects code path where deltas larger than this limit require extra memory allocation for bookkeeping. From patchwork Tue Sep 18 23:29:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Peart X-Patchwork-Id: 10605021 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 142A3157B for ; Tue, 18 Sep 2018 23:29:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 02B822BC53 for ; Tue, 18 Sep 2018 23:29:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EAF6C2BC6A; Tue, 18 Sep 2018 23:29:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 881ED2BC53 for ; Tue, 18 Sep 2018 23:29:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730491AbeISFEe (ORCPT ); Wed, 19 Sep 2018 01:04:34 -0400 Received: from mail-by2nam03on0128.outbound.protection.outlook.com ([104.47.42.128]:52352 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727326AbeISFEe (ORCPT ); Wed, 19 Sep 2018 01:04:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=54auV7nrWb1Fhh3DQPpB6FCqM1a71fvjCvyP2+MXjR4=; b=UXw5jEEUh02fKnoV0129vtW9TwWdWV4/oUe1FrCNhSlOhUrlJKLSwlyeYCYkXJ85E9NBuBhCu4JYP/r9WX0Hl/IfvCTBD6mr2a1hbwoOR82YMnhyEwVJhW0RJhV+Bd0t1n6IoGbVoM6NqTDqEVjkMSDRrcxvv620rNDt3ZHhSHs= Received: from BL0PR2101MB0962.namprd21.prod.outlook.com (52.132.20.155) by BL0PR2101MB0994.namprd21.prod.outlook.com (52.132.23.156) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.1185.6; Tue, 18 Sep 2018 23:29:35 +0000 Received: from BL0PR2101MB0962.namprd21.prod.outlook.com ([fe80::f0b9:d24f:2522:d7be]) by BL0PR2101MB0962.namprd21.prod.outlook.com ([fe80::f0b9:d24f:2522:d7be%2]) with mapi id 15.20.1185.006; Tue, 18 Sep 2018 23:29:35 +0000 From: Ben Peart To: "git@vger.kernel.org" CC: "gitster@pobox.com" , "jrnieder@gmail.com" , Ben Peart , Ben Peart Subject: [PATCH v3 2/5] preload-index: use git_env_bool() not getenv() for customization Thread-Topic: [PATCH v3 2/5] preload-index: use git_env_bool() not getenv() for customization Thread-Index: AQHUT6d1SVlL0SwPJ0WgpIvxPELPxA== Date: Tue, 18 Sep 2018 23:29:34 +0000 Message-ID: <20180918232916.57736-3-benpeart@microsoft.com> References: <20180914143708.63024-1-benpeart@microsoft.com> <20180918232916.57736-1-benpeart@microsoft.com> In-Reply-To: <20180918232916.57736-1-benpeart@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [70.33.148.227] x-mailer: git-send-email 2.18.0.windows.1 x-clientproxiedby: BN6PR19CA0107.namprd19.prod.outlook.com (2603:10b6:404:a0::21) To BL0PR2101MB0962.namprd21.prod.outlook.com (2603:10b6:207:30::27) x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;BL0PR2101MB0994;6:WnHDuXsRwK3QjLLxUIMRWF2IbOHba1cG31VegcyPLE17NmO77iqRXRFONCsGugS1K/pyTestibxs6YrKWii9nrENbWbpG33PQ0j52lbVkquEaqNNtxVZ+83rpLJu5ca6NWSU4MBN5ux+KWIK8BUFUoTXFZ9d+IILroauZMbatEGFOv/M142qllfmLF05+qJxW8yKhZRgsX/h0y2aP+oY466poMtbEyaKvdUABiP+5LK3I1+f+NFohBKau7OYrZlqctUDwuBD/+VWAtT1AAIB7GCc9BzznKmKl6H26I1zk6UvkmEbeYM9P+MYfo8G4KfNrt3if7DudsRmbImo8nG8Q+Iyb8LtJYz86XENxStHzuuPFO2aINax7Y72rMsaxwzoRtQ3ARiMZrhKsHvzUj5GvkhHf8QAf4g/6AYaW6yLQo5FQRy2tb/W3EFQR+ZV6gljdG6/EWFOJAWpoKpG7JVtZA==;5:jViwffs6rBIohdgjgq4ZqQrlvxS2nFNTle7pcG3LVweEakrrBWcZLgOooX2QOa6TBhkSvs9uF44Z0ygbri3rrtiXRK/zqU0VI0fFKg5Vr2Tr7BH1d6i1YVj9Z4T6gtl6anky2FckJywW803imj9F/PSNpdRuiMX6JCD16P5Q79Y=;7:/Z5m8D63igoXCgpVB1f6MHdESLLG/x4Q8rxLtL18vNEsLM1WX9XT9+V8/KeUYopjyvqMIM6vaWxxQaHj9eMGTpcVXdM/eUtJcqlVR8KHw4Ccs3J/OicudeXShkgUP1Ntb3TsM7GPNbX4vecr3Nifr3fvb0u0TzqJWyiZ7UgrzWaHWZUDLX6rZYLLxWn+al+cQjWESXEwUE3yLjLjkgN1vZDDn34HaK/ukKoV8D3yIAIo8J6tsJ1nVOFlwzRQNz3h x-ms-office365-filtering-correlation-id: a4b0e518-bd80-4ba8-7206-08d61dbe97bf x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(4534165)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7193020);SRVR:BL0PR2101MB0994; x-ms-traffictypediagnostic: BL0PR2101MB0994: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3002001)(10201501046)(3231355)(944501410)(52105095)(2018427008)(93006095)(93001095)(6055026)(149027)(150027)(6041310)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699050)(76991041);SRVR:BL0PR2101MB0994;BCL:0;PCL:0;RULEID:;SRVR:BL0PR2101MB0994; x-forefront-prvs: 0799B1B2D7 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(346002)(396003)(376002)(366004)(136003)(39860400002)(199004)(189003)(54906003)(14444005)(68736007)(2616005)(2906002)(86612001)(5640700003)(476003)(11346002)(256004)(6506007)(386003)(102836004)(8676002)(3846002)(6512007)(50226002)(36756003)(6116002)(446003)(316002)(486006)(6916009)(1076002)(2900100001)(8936002)(66066001)(10290500003)(5660300001)(81156014)(478600001)(1730700003)(72206003)(186003)(14454004)(99286004)(26005)(105586002)(52116002)(53936002)(2351001)(4326008)(81166006)(6486002)(2501003)(97736004)(107886003)(22452003)(76176011)(106356001)(5250100002)(6346003)(39060400002)(10090500001)(6436002)(305945005)(25786009)(7736002);DIR:OUT;SFP:1102;SCL:1;SRVR:BL0PR2101MB0994;H:BL0PR2101MB0962.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Ben.Peart@microsoft.com; x-microsoft-antispam-message-info: NgXMkyPleLLJbrFPuC2CbRNLCY0uTniYfbkPRosDHFdS8qMp9MZv5fWaOKB4Q1ATlf6MxUEblqNUhj6V1/DepqGx9ZnhlDYivc/EtvEjR7RnMvHNWm8vqMlpPlPeWcIlOsqJ6RwPyY3UsQfZ4y1O+DgyVp7ePLMvIXtfzxvlIV5KvyFMUFmJQsKvdkIafWiFzusM8msDlzVthyUZ8qBv1guvcJN7TgNMBocxK1/sQgbOL5m24US+eUDf/MuGvbNLRoXIWU+85yX/RjzmqInvIBo+D5br3wVukyDj35CnARvS75Mr6219CldvWaycGjAl7BBdZMIt3/T98uTGQWcrOi7X/g8NHd2CRIWuQ6uYAoM= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: a4b0e518-bd80-4ba8-7206-08d61dbe97bf X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Sep 2018 23:29:34.9058 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR2101MB0994 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP GIT_FORCE_PRELOAD_TEST is only checked for presence by using getenv(). Use git_env_bool() instead so that GIT_FORCE_PRELOAD_TEST=false can work as expected. Signed-off-by: Ben Peart --- preload-index.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/preload-index.c b/preload-index.c index 71cd2437a3..0a4e2933bb 100644 --- a/preload-index.c +++ b/preload-index.c @@ -5,6 +5,7 @@ #include "pathspec.h" #include "dir.h" #include "fsmonitor.h" +#include "config.h" #ifdef NO_PTHREADS static void preload_index(struct index_state *index, @@ -84,7 +85,7 @@ static void preload_index(struct index_state *index, return; threads = index->cache_nr / THREAD_COST; - if ((index->cache_nr > 1) && (threads < 2) && getenv("GIT_FORCE_PRELOAD_TEST")) + if ((index->cache_nr > 1) && (threads < 2) && git_env_bool("GIT_FORCE_PRELOAD_TEST", 0)) threads = 2; if (threads < 2) return; From patchwork Tue Sep 18 23:29:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Peart X-Patchwork-Id: 10605023 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E70BD161F for ; Tue, 18 Sep 2018 23:29:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D619E2BC5E for ; Tue, 18 Sep 2018 23:29:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CA4842BC71; Tue, 18 Sep 2018 23:29:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4FEB62BC5E for ; Tue, 18 Sep 2018 23:29:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730537AbeISFEj (ORCPT ); Wed, 19 Sep 2018 01:04:39 -0400 Received: from mail-by2nam03on0128.outbound.protection.outlook.com ([104.47.42.128]:52352 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730438AbeISFEj (ORCPT ); Wed, 19 Sep 2018 01:04:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pBPv0x7qpFIjCywICJvI2lmeTtqGYm7nMVlfVZVAxI0=; b=U+WGVXiFj8wgJN2bIZ4HidiMuJRP3q0kF2ozVNEifpSxJx7lU7ax1oHXYmSuyc+M0Np6lFZvcdWKiXVse+Bo93bemLCz2e3wT+fEtabXG2+WmdIZ3Le7eJYKY5fal80G9RvRBbUbreeHQcRDmmcIdBRuffYlIUbAvHgjyLKKtfw= Received: from BL0PR2101MB0962.namprd21.prod.outlook.com (52.132.20.155) by BL0PR2101MB0994.namprd21.prod.outlook.com (52.132.23.156) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.1185.6; Tue, 18 Sep 2018 23:29:36 +0000 Received: from BL0PR2101MB0962.namprd21.prod.outlook.com ([fe80::f0b9:d24f:2522:d7be]) by BL0PR2101MB0962.namprd21.prod.outlook.com ([fe80::f0b9:d24f:2522:d7be%2]) with mapi id 15.20.1185.006; Tue, 18 Sep 2018 23:29:36 +0000 From: Ben Peart To: "git@vger.kernel.org" CC: "gitster@pobox.com" , "jrnieder@gmail.com" , Ben Peart , Ben Peart Subject: [PATCH v3 3/5] fsmonitor: update GIT_TEST_FSMONITOR support Thread-Topic: [PATCH v3 3/5] fsmonitor: update GIT_TEST_FSMONITOR support Thread-Index: AQHUT6d17ird1dTN6UyrvxGPAtD0Ow== Date: Tue, 18 Sep 2018 23:29:35 +0000 Message-ID: <20180918232916.57736-4-benpeart@microsoft.com> References: <20180914143708.63024-1-benpeart@microsoft.com> <20180918232916.57736-1-benpeart@microsoft.com> In-Reply-To: <20180918232916.57736-1-benpeart@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [70.33.148.227] x-mailer: git-send-email 2.18.0.windows.1 x-clientproxiedby: BN6PR19CA0107.namprd19.prod.outlook.com (2603:10b6:404:a0::21) To BL0PR2101MB0962.namprd21.prod.outlook.com (2603:10b6:207:30::27) x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;BL0PR2101MB0994;6:lKGkhVY8MkBYvo3RqK4H++mm7OCBMs2GY0dsv+EW3aVx3tYnYdGtxru5IiMVl4rXUS8gcL4e8KVRjXq+KZmi/YISBBf33/18yAKlvxcwTlninmBRbf44qEpg9f44NWWzCLgzG1E/w8sVxDNlMSzs0ieAUMIA1DZhsjxBTzNJHMLs29iv+GXBhBnNEpy2Q3J33H/+pu+vlTsPZP17/PcqiXtpRrLjqjJnqsLvfyVrfsIS7ApzNUZKCAA49J8ClmSgmvX6bZ7D9SMYZQgycVw6Nzzme2jf0aQjUhxM41+gPTME8ZkDNy+WUW/XrqeRsKWcLsBq6grhWJV+wJg+A8Y8D+JZbo4JEc4EqysbB9ygQntovfzaanpzNQ30rQ/VlLpYFYP9LoMo3M/CfQDi1ns4HKHY+ld1NYHKcZMEDlozK98NfEPj0ODUwa0hj7XRjjzUd0ZgDBgi9eax+2Ox/bxCkA==;5:1jKTfHijkO/oA+rNlMC106bmutgjCLGibUBEUgU5MRdE01ijKBAaC3PtzpgOAmaWZ4YilUgtPAbjaLt+l59go7siQzQadPHdR5XG95gwruKtjog5k1/NSPp31a9H71CxawjszgQoPG0mWWOnjfbLayW8Z0bWVf95iNt7f3/gfjw=;7:4HMgkIidURoDCLNcD5u06j7yeuKUWjhzwMUiqqMgSKu3CscThzUbm7S8edKTxnyCaJnzFK/IgFHPrR26nMUGdk7w1AmgWqCVJ1yk2vyw42goBW3balYtdZw0tAQr4J7SKnKBDcSMfkDDDE1iQjKFtmX1Wee0gU8ZX89UtjIfJUxlqzuQIDWvttdUgDkqXEQcH3g0hjamfepM+lnqxBRWWTH0I0jCHtYLHTwTygm60+y7F5m87ASuBzevqoVthtiM x-ms-office365-filtering-correlation-id: e271539b-839b-4b1a-bd87-08d61dbe980b x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(4534165)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7193020);SRVR:BL0PR2101MB0994; x-ms-traffictypediagnostic: BL0PR2101MB0994: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3002001)(10201501046)(3231355)(944501410)(52105095)(2018427008)(93006095)(93001095)(6055026)(149027)(150027)(6041310)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699050)(76991041);SRVR:BL0PR2101MB0994;BCL:0;PCL:0;RULEID:;SRVR:BL0PR2101MB0994; x-forefront-prvs: 0799B1B2D7 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(346002)(396003)(376002)(366004)(136003)(39860400002)(199004)(189003)(54906003)(14444005)(68736007)(2616005)(2906002)(86612001)(5640700003)(476003)(11346002)(256004)(6506007)(386003)(102836004)(8676002)(3846002)(6512007)(50226002)(36756003)(6116002)(446003)(316002)(486006)(575784001)(6916009)(1076002)(2900100001)(8936002)(66066001)(10290500003)(5660300001)(81156014)(478600001)(1730700003)(72206003)(186003)(14454004)(99286004)(26005)(105586002)(15650500001)(52116002)(53936002)(2351001)(4326008)(81166006)(6486002)(2501003)(97736004)(107886003)(22452003)(76176011)(106356001)(5250100002)(6346003)(39060400002)(10090500001)(6436002)(305945005)(25786009)(7736002);DIR:OUT;SFP:1102;SCL:1;SRVR:BL0PR2101MB0994;H:BL0PR2101MB0962.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Ben.Peart@microsoft.com; x-microsoft-antispam-message-info: 3ODwoA/CPa8uNtf43MaEmjnYzE9ZhLGLOPRIbTmBUBURBxiCw8xxsA4b4/zPydfSPYlmlJLyg4Y2dQn1r7CUDAW+KEyA07i4lKH27h3f/zRUs0qN0N3WO3snFvCCrE8gJPZ6YCJCc7AVIX77PUH4A6WOmJfy/7iif8SvEbsKh3TWUCK2eQo3kmei8hTnUuoHCsXDS8H8UX4mOCmQAercybusyufH6B2uLGvlVwjqoVyDn+JlgotyyQyWfk302ScNhQb6UokgNVuyyoDXDLeOVMs4BcYwXUz7jyPp1iQ54Wsas1YBMfu6NIrAzXBJRjFNUmKdF7MQco8GZ8qzAUML6WumxPTzPHua9xIYtW7B8og= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: e271539b-839b-4b1a-bd87-08d61dbe980b X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Sep 2018 23:29:35.4995 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR2101MB0994 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Rename GIT_FSMONITOR_TEST to GIT_TEST_FSMONITOR for consistency with the other GIT_TEST_ special setups and properly document its use. Add logic in t/test-lib.sh to give a warning when the old variable is set to let people know they need to update their environment to use the new variable. Signed-off-by: Ben Peart Signed-off-by: Ben Peart --- config.c | 2 +- t/README | 4 ++++ t/t1700-split-index.sh | 2 +- t/t7519-status-fsmonitor.sh | 2 +- t/test-lib.sh | 20 ++++++++++++++++++++ 5 files changed, 27 insertions(+), 3 deletions(-) diff --git a/config.c b/config.c index 3461993f0a..3555c63f28 100644 --- a/config.c +++ b/config.c @@ -2278,7 +2278,7 @@ int git_config_get_max_percent_split_change(void) int git_config_get_fsmonitor(void) { if (git_config_get_pathname("core.fsmonitor", &core_fsmonitor)) - core_fsmonitor = getenv("GIT_FSMONITOR_TEST"); + core_fsmonitor = getenv("GIT_TEST_FSMONITOR"); if (core_fsmonitor && !*core_fsmonitor) core_fsmonitor = NULL; diff --git a/t/README b/t/README index 56a417439c..47165f7eab 100644 --- a/t/README +++ b/t/README @@ -319,6 +319,10 @@ GIT_TEST_OE_DELTA_SIZE= exercises the uncommon pack-objects code path where deltas larger than this limit require extra memory allocation for bookkeeping. +GIT_TEST_FSMONITOR=$PWD/t7519/fsmonitor-all exercises the fsmonitor +code path for utilizing a file system monitor to speed up detecting +new or changed files. + Naming Tests ------------ diff --git a/t/t1700-split-index.sh b/t/t1700-split-index.sh index b3b4d83eaf..f6a856f24c 100755 --- a/t/t1700-split-index.sh +++ b/t/t1700-split-index.sh @@ -6,7 +6,7 @@ test_description='split index mode tests' # We need total control of index splitting here sane_unset GIT_TEST_SPLIT_INDEX -sane_unset GIT_FSMONITOR_TEST +sane_unset GIT_TEST_FSMONITOR test_expect_success 'enable split index' ' git config splitIndex.maxPercentChange 100 && diff --git a/t/t7519-status-fsmonitor.sh b/t/t7519-status-fsmonitor.sh index 756beb0d8e..d77012ea6d 100755 --- a/t/t7519-status-fsmonitor.sh +++ b/t/t7519-status-fsmonitor.sh @@ -8,7 +8,7 @@ test_description='git status with file system watcher' # To run the entire git test suite using fsmonitor: # # copy t/t7519/fsmonitor-all to a location in your path and then set -# GIT_FSMONITOR_TEST=fsmonitor-all and run your tests. +# GIT_TEST_FSMONITOR=fsmonitor-all and run your tests. # # Note, after "git reset --hard HEAD" no extensions exist other than 'TREE' diff --git a/t/test-lib.sh b/t/test-lib.sh index 44288cbb59..653688c067 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -140,6 +140,26 @@ then export GIT_INDEX_VERSION fi +check_var_migration () { + old_name=$1 new_name=$2 + eval "old_isset=\${${old_name}:+isset}" + eval "new_isset=\${${new_name}:+isset}" + case "$old_isset,$new_isset" in + isset,) + echo >&2 "warning: $old_name is now $new_name" + echo >&2 "hint: set $new_name too during the transition period" + eval "$new_name=\$$old_name" + ;; + isset,isset) + # do this later + # echo >&2 "warning: $old_name is now $new_name" + # echo >&2 "hint: remove $old_name" + ;; + esac +} + +check_var_migration GIT_FSMONITOR_TEST GIT_TEST_FSMONITOR + # Add libc MALLOC and MALLOC_PERTURB test # only if we are not executing the test with valgrind if expr " $GIT_TEST_OPTS " : ".* --valgrind " >/dev/null || From patchwork Tue Sep 18 23:29:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Peart X-Patchwork-Id: 10605025 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 229D6161F for ; Tue, 18 Sep 2018 23:29:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 11D6D2BC53 for ; Tue, 18 Sep 2018 23:29:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 05BDC2BC6A; Tue, 18 Sep 2018 23:29:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 862162BC53 for ; Tue, 18 Sep 2018 23:29:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730549AbeISFEl (ORCPT ); Wed, 19 Sep 2018 01:04:41 -0400 Received: from mail-by2nam03on0128.outbound.protection.outlook.com ([104.47.42.128]:52352 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727326AbeISFEl (ORCPT ); Wed, 19 Sep 2018 01:04:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+HvX27Gm77CpedPgCethpuqWrkCpSsxyt3gmbF+nIOU=; b=of+6tVxldkmj06kwqzS1MZ73zhDDrg0qIjPpqmmM2y5HSWD566BasjMucuzuWSAbikndaOq9jIfWiyUaPWGkWQqkNPR2ccmy7CA4Y9xzFf9/u61/100WdzduSOM+knXTK/ca3ngnf+ZAJCrtJ+D1K/RRL05x5183YtIFpZYf/So= Received: from BL0PR2101MB0962.namprd21.prod.outlook.com (52.132.20.155) by BL0PR2101MB0994.namprd21.prod.outlook.com (52.132.23.156) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.1185.6; Tue, 18 Sep 2018 23:29:37 +0000 Received: from BL0PR2101MB0962.namprd21.prod.outlook.com ([fe80::f0b9:d24f:2522:d7be]) by BL0PR2101MB0962.namprd21.prod.outlook.com ([fe80::f0b9:d24f:2522:d7be%2]) with mapi id 15.20.1185.006; Tue, 18 Sep 2018 23:29:36 +0000 From: Ben Peart To: "git@vger.kernel.org" CC: "gitster@pobox.com" , "jrnieder@gmail.com" , Ben Peart , Ben Peart Subject: [PATCH v3 4/5] read-cache: update TEST_GIT_INDEX_VERSION support Thread-Topic: [PATCH v3 4/5] read-cache: update TEST_GIT_INDEX_VERSION support Thread-Index: AQHUT6d2IAWURHwFNka1k5BUPMcwtw== Date: Tue, 18 Sep 2018 23:29:36 +0000 Message-ID: <20180918232916.57736-5-benpeart@microsoft.com> References: <20180914143708.63024-1-benpeart@microsoft.com> <20180918232916.57736-1-benpeart@microsoft.com> In-Reply-To: <20180918232916.57736-1-benpeart@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [70.33.148.227] x-mailer: git-send-email 2.18.0.windows.1 x-clientproxiedby: BN6PR19CA0107.namprd19.prod.outlook.com (2603:10b6:404:a0::21) To BL0PR2101MB0962.namprd21.prod.outlook.com (2603:10b6:207:30::27) x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;BL0PR2101MB0994;6:LxpWUOGFwzqke+VDfJC17jZ20CcVePQfQ9v+AH5Vr4RZvv+8QXlVGjohDEmUNOpIIWO30+TrZrsnuqwM8VHEc2qfAU9i0oYlRMIqefzOgtKsbvAvooEr/W/TDSgJbDVWl77vHEFrKl9j22ix/K78HT9lBJf7di1ledHSnwT6Qh0UsEKnyuXvuKj+CatlWpjZap2mtTa1JGo/mIiay76yYbCgulAWE1Mc1XeYIrs66s7DbmzkDyCvcL3zL18ScUr49ptkqvEvThwtuojEK/FU2jB9YT6wFUlS60JkBVfFUqBPOIDbrdUjN93H2z4ioo0J4pvmW4LkwmWZVmYO4dtHuTut+P5N7TE5ZrqzXuQDbd3d62x6D6FkX/K580McCqob5jjxcc7ze3B9o8YK9qrUZse7XDtDHgFHxyeUpUu8lioeHNJOTErtDJ8JebBerXTBNMMj4WH8taA45kWK88i5gQ==;5:3Rpz+UP7TYLFnYYyC4DaH8lxtMHDH3rgRE8QGE8xYPh1qWONnRMj/okniBSxMzL/MgrAz1Q1KYnfPYuYTDhVyfiwD+kz/2VUuO3sczNmflxsizaNqEmEslDY+P+ML3Ua5WoWX9wvIrFgDLDvUQkqJ1RoOTOHKyG2tV9CCPoYUJ4=;7:aqBTmnZ/bf8JiOEa6bSIxunzDQMSELmZzLtSQqdp7yIefq7p+544WWTAKE+lblMf2pCYIcKoaZ6XZ4ZQUZYmKm0nJryailbjfU8DMWY5YoYGvT7eHmTpmCTBIjCG+DzrGzzXIlrPGd4K7YVzL6ILz4NYMShIXKD8uYSiVI15NzddcxqJsZv/iYY/4Kjyf166SVf62tOS085viNtNia6F1UHcYzwdO/f2lA5MxRuqpb4xwYb7F0JZ7QAUEbDWrH3o x-ms-office365-filtering-correlation-id: 03242ecb-5134-49e6-1be8-08d61dbe986b x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(4534165)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7193020);SRVR:BL0PR2101MB0994; x-ms-traffictypediagnostic: BL0PR2101MB0994: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3002001)(10201501046)(3231355)(944501410)(52105095)(2018427008)(93006095)(93001095)(6055026)(149027)(150027)(6041310)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699050)(76991041);SRVR:BL0PR2101MB0994;BCL:0;PCL:0;RULEID:;SRVR:BL0PR2101MB0994; x-forefront-prvs: 0799B1B2D7 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(346002)(396003)(376002)(366004)(136003)(39860400002)(199004)(189003)(54906003)(14444005)(68736007)(2616005)(2906002)(86612001)(5640700003)(476003)(11346002)(256004)(6506007)(386003)(102836004)(8676002)(3846002)(6512007)(50226002)(36756003)(6116002)(446003)(316002)(486006)(6916009)(1076002)(2900100001)(8936002)(66066001)(10290500003)(5660300001)(81156014)(478600001)(1730700003)(72206003)(186003)(14454004)(99286004)(26005)(105586002)(15650500001)(52116002)(53936002)(2351001)(4326008)(81166006)(6486002)(2501003)(97736004)(107886003)(22452003)(76176011)(106356001)(5250100002)(6346003)(39060400002)(10090500001)(6436002)(305945005)(25786009)(7736002);DIR:OUT;SFP:1102;SCL:1;SRVR:BL0PR2101MB0994;H:BL0PR2101MB0962.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Ben.Peart@microsoft.com; x-microsoft-antispam-message-info: 3XIfy9y3/Z17809yx4+qw+py+lFszwtXAZ8i3iWzr+w4ME5p7e86LLx2Ja2bymrIgqkt6gjlAX1RQirJmtFlhYtnH34iWCRKfR0ilnUct4pz5bCkWc0/L9VYiQzOc7KWa6+6f7s3B+RLmdJ7mqtwrVvD3hVUJa/JiMEtv2zwiUprRNijpteyzN25V0ck2NElwMoG+p2+Zdb7yupf0CBsxjTJzSoAXm/DQ34vKSkVN920zq4IBBn99bAxSZ11F8+zg5DzcTCBn7o4m5AyubO11Rh9W2x2+cWD4PkLFeCFqsXBXksX0gqlzCRYKUGxYhgOsenIEJ25ha/UtmMqc/799qU9EgK0gA8fZMyAjgo3DUo= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 03242ecb-5134-49e6-1be8-08d61dbe986b X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Sep 2018 23:29:36.0464 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR2101MB0994 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Rename TEST_GIT_INDEX_VERSION to GIT_TEST_INDEX_VERSION for consistency with the other GIT_TEST_ special setups and properly document its use. Add logic in t/test-lib.sh to give a warning when the old variable is set to let people know they need to update their environment to use the new variable. Signed-off-by: Ben Peart --- Makefile | 6 +++--- t/README | 4 ++++ t/test-lib.sh | 14 ++++++++------ 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 5a969f5830..9e84ef02f7 100644 --- a/Makefile +++ b/Makefile @@ -400,7 +400,7 @@ all:: # (defaults to "man") if you want to have a different default when # "git help" is called without a parameter specifying the format. # -# Define TEST_GIT_INDEX_VERSION to 2, 3 or 4 to run the test suite +# Define GIT_TEST_INDEX_VERSION to 2, 3 or 4 to run the test suite # with a different indexfile format version. If it isn't set the index # file format used is index-v[23]. # @@ -2599,8 +2599,8 @@ endif ifdef GIT_INTEROP_MAKE_OPTS @echo GIT_INTEROP_MAKE_OPTS=\''$(subst ','\'',$(subst ','\'',$(GIT_INTEROP_MAKE_OPTS)))'\' >>$@+ endif -ifdef TEST_GIT_INDEX_VERSION - @echo TEST_GIT_INDEX_VERSION=\''$(subst ','\'',$(subst ','\'',$(TEST_GIT_INDEX_VERSION)))'\' >>$@+ +ifdef GIT_TEST_INDEX_VERSION + @echo GIT_TEST_INDEX_VERSION=\''$(subst ','\'',$(subst ','\'',$(GIT_TEST_INDEX_VERSION)))'\' >>$@+ endif @if cmp $@+ $@ >/dev/null 2>&1; then $(RM) $@+; else mv $@+ $@; fi diff --git a/t/README b/t/README index 47165f7eab..9b13f6d12e 100644 --- a/t/README +++ b/t/README @@ -323,6 +323,10 @@ GIT_TEST_FSMONITOR=$PWD/t7519/fsmonitor-all exercises the fsmonitor code path for utilizing a file system monitor to speed up detecting new or changed files. +GIT_TEST_INDEX_VERSION= exercises the index read/write code path +for the index version specified. Can be set to any valid version +(currently 2, 3, or 4). + Naming Tests ------------ diff --git a/t/test-lib.sh b/t/test-lib.sh index 653688c067..e80c84d13c 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -134,12 +134,6 @@ export EDITOR GIT_TRACE_BARE=1 export GIT_TRACE_BARE -if test -n "${TEST_GIT_INDEX_VERSION:+isset}" -then - GIT_INDEX_VERSION="$TEST_GIT_INDEX_VERSION" - export GIT_INDEX_VERSION -fi - check_var_migration () { old_name=$1 new_name=$2 eval "old_isset=\${${old_name}:+isset}" @@ -159,6 +153,14 @@ check_var_migration () { } check_var_migration GIT_FSMONITOR_TEST GIT_TEST_FSMONITOR +check_var_migration TEST_GIT_INDEX_VERSION GIT_TEST_INDEX_VERSION + +# Use specific version of the index file format +if test -n "${GIT_TEST_INDEX_VERSION:+isset}" +then + GIT_INDEX_VERSION="$GIT_TEST_INDEX_VERSION" + export GIT_INDEX_VERSION +fi # Add libc MALLOC and MALLOC_PERTURB test # only if we are not executing the test with valgrind From patchwork Tue Sep 18 23:29:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Peart X-Patchwork-Id: 10605027 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 36DD2157B for ; Tue, 18 Sep 2018 23:30:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 25D552BC5E for ; Tue, 18 Sep 2018 23:30:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1A09E2BC81; Tue, 18 Sep 2018 23:30:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 672152BC5E for ; Tue, 18 Sep 2018 23:30:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727326AbeISFFP (ORCPT ); Wed, 19 Sep 2018 01:05:15 -0400 Received: from mail-eopbgr680135.outbound.protection.outlook.com ([40.107.68.135]:62861 "EHLO NAM04-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726988AbeISFFP (ORCPT ); Wed, 19 Sep 2018 01:05:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/2ZAUas1R1x9ghC1R3CXa7mEQdIoIKZLfSNyJy06Lq8=; b=G7Z7uqo4tn9jHF992yv5keA2RqGyqdNVm1T9plU6X4BIed4LDWaiHApNZBLhZ8pvprxiA6EVaYeoa86yTJE84nlGxIojBD0SU90iTiWuEGzY9AGn9TzrXtQIGpUPUBeKRuakTSUUnnfMB6zeCyh2mjNjeLd6p94sl3tVAibJoJs= Received: from BL0PR2101MB0962.namprd21.prod.outlook.com (52.132.20.155) by BL0PR2101MB1092.namprd21.prod.outlook.com (52.132.24.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1185.6; Tue, 18 Sep 2018 23:29:37 +0000 Received: from BL0PR2101MB0962.namprd21.prod.outlook.com ([fe80::f0b9:d24f:2522:d7be]) by BL0PR2101MB0962.namprd21.prod.outlook.com ([fe80::f0b9:d24f:2522:d7be%2]) with mapi id 15.20.1185.006; Tue, 18 Sep 2018 23:29:37 +0000 From: Ben Peart To: "git@vger.kernel.org" CC: "gitster@pobox.com" , "jrnieder@gmail.com" , Ben Peart , Ben Peart Subject: [PATCH v3 5/5] preload-index: update GIT_FORCE_PRELOAD_TEST support Thread-Topic: [PATCH v3 5/5] preload-index: update GIT_FORCE_PRELOAD_TEST support Thread-Index: AQHUT6d2t0DJog0CkU6eOsR67IUsuA== Date: Tue, 18 Sep 2018 23:29:37 +0000 Message-ID: <20180918232916.57736-6-benpeart@microsoft.com> References: <20180914143708.63024-1-benpeart@microsoft.com> <20180918232916.57736-1-benpeart@microsoft.com> In-Reply-To: <20180918232916.57736-1-benpeart@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [70.33.148.227] x-mailer: git-send-email 2.18.0.windows.1 x-clientproxiedby: BN6PR19CA0107.namprd19.prod.outlook.com (2603:10b6:404:a0::21) To BL0PR2101MB0962.namprd21.prod.outlook.com (2603:10b6:207:30::27) x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;BL0PR2101MB1092;6:owmucT3YfLml75ZXrAkQwE3a5NKGn5+cupAi7yyEASyqxwkuq5tNaPhuO4JZKuknafRB8Tl7hSMQtjP+9e2URbSXxG9vBSQxYbz4jtk0pT8QCg3BuFCB7LsodiRUp9BZ+nUhQiMQcQpJ+NWwxtlJb85sUttFchGVPWiOPhXnNcvJyPKyOx8ANmZiEM37dvf12DmdR2TtaymaPadLUfEfxGo54zvdeWGfTNRrbMtDZ6WAO1aajmtuDDoLCIkvL1ZXjlaMzsOY5JHrOfs0g4Lk/wlEEQZ+9UEdUwPIB2eEsMVsqZH5phhnSqp6fSgdX83Ygh/3P9WDC7lF7/9Bhy47/T3IvZZt/CAG2dLwWXuxopxhVZAplzJ3811pJBYpZ350FrYEZ21EZBQ4ga5icFR7MBa4iHrE+IduEpmYtEr7CeAKmO7IoxPdPQo729Z9Yulw6xRzEI1o6FtEqJNHohoiaQ==;5:mJAWTlmWJ5eiNnTNvG0UDv0UOR4Aahiergw6e6XTmKLUcC/7ldjibHmoMUwcBXPyt2T3zJOonyD1nk7S5UsYroyQLwq4oQokF6uXwe4+1tVi/xhynHHOafX7N5SvGIK3Fgwz3NMViUPIhNlL0V3IajKqOeXyLWJtumTAOb/Zen8=;7:DfqYJHy4BvvLmJPlsG1AICeVdaMgkSXeCqnBZzTFrsF7eVAT3y4iMzEa+2gFsd+PvIfaa/uNWxNKdFwUmoUNExWrHozkc70b3Gjjr2OX3Qtl6scX9UeZIpRFqgFRCPqhk46AzTDRnLqvLNQDuj5Acw9EkARDXngR/rTfZDlolroyeqsaOGmjdcA5TBl2eTNUhn6+rXed0z6Q9NWLVHNTPEK748QltaRDBOA+wNRG6AmoKUPfsL8z3q3MRZ7bdE1R x-ms-office365-filtering-correlation-id: c1e2c68e-6ea9-42e2-2c1b-08d61dbe98bc x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(4534165)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7193020);SRVR:BL0PR2101MB1092; x-ms-traffictypediagnostic: BL0PR2101MB1092: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3002001)(10201501046)(3231355)(944501410)(52105095)(2018427008)(93006095)(93001095)(6055026)(149027)(150027)(6041310)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699050)(76991041);SRVR:BL0PR2101MB1092;BCL:0;PCL:0;RULEID:;SRVR:BL0PR2101MB1092; x-forefront-prvs: 0799B1B2D7 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(366004)(396003)(346002)(136003)(39860400002)(376002)(189003)(199004)(186003)(14454004)(8936002)(316002)(81156014)(107886003)(39060400002)(15650500001)(102836004)(2501003)(7736002)(36756003)(476003)(256004)(446003)(14444005)(486006)(305945005)(5660300001)(2616005)(26005)(10090500001)(22452003)(106356001)(81166006)(2351001)(105586002)(11346002)(6916009)(5640700003)(1730700003)(6116002)(54906003)(3846002)(1076002)(6436002)(6506007)(2906002)(6512007)(6486002)(68736007)(386003)(8676002)(97736004)(478600001)(72206003)(52116002)(6346003)(10290500003)(4326008)(5250100002)(25786009)(66066001)(76176011)(99286004)(50226002)(53936002)(86612001)(2900100001);DIR:OUT;SFP:1102;SCL:1;SRVR:BL0PR2101MB1092;H:BL0PR2101MB0962.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Ben.Peart@microsoft.com; x-microsoft-antispam-message-info: sE0fJNMk/Zcov/+ojk0yQpB1Q2nzftNk+k6UwZVdbDDSGQT32QGEWlxsWdDc3BkFW3q3+wNikiFYsjCL0X+1rPrGiSdPktu2jgxlBKlsdjewhlXIjvsOWRmNytNpeRowLniKAP/6b1EpXpQ9EYrGAgWKODP4799ZKvv8NQrsouH/uWtqYxydg1FnISXgEvzSu07pfOAa0aNgPi92+8KZVCWA3U5Vj9h7R/3DEPTjRRUsnsnSq6Tl/mz7AmErYBekieWaug+vIiPkrF4o+N5+bpt8IJBbUwUag6hyp0FhQoQlyUFJw1sWq6i6j0B6j9u1c1CrIs3LmXXGP4YsnyvxsDe4+MXNfol5DSZzLMD/oec= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: c1e2c68e-6ea9-42e2-2c1b-08d61dbe98bc X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Sep 2018 23:29:37.3120 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR2101MB1092 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Rename GIT_FORCE_PRELOAD_TEST to GIT_TEST_PRELOAD_INDEX for consistency with the other GIT_TEST_ special setups and properly document its use. Add logic in t/test-lib.sh to give a warning when the old variable is set to let people know they need to update their environment to use the new variable. Signed-off-by: Ben Peart --- preload-index.c | 2 +- t/README | 3 +++ t/t7519-status-fsmonitor.sh | 4 ++-- t/test-lib.sh | 1 + 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/preload-index.c b/preload-index.c index 0a4e2933bb..a850e197c2 100644 --- a/preload-index.c +++ b/preload-index.c @@ -85,7 +85,7 @@ static void preload_index(struct index_state *index, return; threads = index->cache_nr / THREAD_COST; - if ((index->cache_nr > 1) && (threads < 2) && git_env_bool("GIT_FORCE_PRELOAD_TEST", 0)) + if ((index->cache_nr > 1) && (threads < 2) && git_env_bool("GIT_TEST_PRELOAD_INDEX", 0)) threads = 2; if (threads < 2) return; diff --git a/t/README b/t/README index 9b13f6d12e..5670c7aad0 100644 --- a/t/README +++ b/t/README @@ -327,6 +327,9 @@ GIT_TEST_INDEX_VERSION= exercises the index read/write code path for the index version specified. Can be set to any valid version (currently 2, 3, or 4). +GIT_TEST_PRELOAD_INDEX= exercises the preload-index code path +by overriding the minimum number of cache entries required per thread. + Naming Tests ------------ diff --git a/t/t7519-status-fsmonitor.sh b/t/t7519-status-fsmonitor.sh index d77012ea6d..8308d6d5b1 100755 --- a/t/t7519-status-fsmonitor.sh +++ b/t/t7519-status-fsmonitor.sh @@ -245,9 +245,9 @@ do git config core.preloadIndex $preload_val && if test $preload_val = true then - GIT_FORCE_PRELOAD_TEST=$preload_val; export GIT_FORCE_PRELOAD_TEST + GIT_TEST_PRELOAD_INDEX=$preload_val; export GIT_TEST_PRELOAD_INDEX else - unset GIT_FORCE_PRELOAD_TEST + sane_unset GIT_TEST_PRELOAD_INDEX fi ' diff --git a/t/test-lib.sh b/t/test-lib.sh index e80c84d13c..8ef86e05a3 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -154,6 +154,7 @@ check_var_migration () { check_var_migration GIT_FSMONITOR_TEST GIT_TEST_FSMONITOR check_var_migration TEST_GIT_INDEX_VERSION GIT_TEST_INDEX_VERSION +check_var_migration GIT_FORCE_PRELOAD_TEST GIT_TEST_PRELOAD_INDEX # Use specific version of the index file format if test -n "${GIT_TEST_INDEX_VERSION:+isset}"