From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-3.3 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by dcvr.yhbt.net (Postfix) with ESMTP id 1A6061F403 for ; Tue, 18 Oct 2022 15:07:19 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; secure) header.d=gmx.net header.i=@gmx.net header.b="R1aaT5dY"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230484AbiJRPGk (ORCPT ); Tue, 18 Oct 2022 11:06:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230122AbiJRPGg (ORCPT ); Tue, 18 Oct 2022 11:06:36 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A46B5C3574 for ; Tue, 18 Oct 2022 08:06:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1666105591; bh=T5szwesnZOrcG31lZnd0Er3ug3oN8MuwwktLx5Xo8Ic=; h=X-UI-Sender-Class:Date:From:To:cc:Subject:In-Reply-To:References; b=R1aaT5dYSft4ypDaEjz/SO6MQqCAt8JWPeN84eMrl6GUOE64qFTZ+1bsg+v1V7Bpi VPdoyWNoGxvmMfjKesEMO+SOXsaCNfkQJ0ecxiu2mThJYhue7AfeiOTphqDZmU4In9 FgPjPROrNaqo+/sE8l+u9oyZgoNv/UFqA+a/Sgd4= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [172.18.67.214] ([213.196.212.100]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MJmKh-1oRE1W1gJF-00KCIs; Tue, 18 Oct 2022 17:06:31 +0200 Date: Tue, 18 Oct 2022 16:21:10 +0200 (CEST) From: Johannes Schindelin To: =?UTF-8?Q?=C3=86var_Arnfj=C3=B6r=C3=B0_Bjarmason?= cc: Johannes Schindelin via GitGitGadget , git@vger.kernel.org, Phillip Wood , Victoria Dye , Eric Sunshine Subject: Re: [PATCH v3 4/5] cmake: avoid editing t/test-lib.sh In-Reply-To: <221018.86sfjlgr54.gmgdl@evledraar.gmail.com> Message-ID: References: <5b0c2a150e9fce1ca0284d65628b42ed5a7aad9a.1666090745.git.gitgitgadget@gmail.com> <221018.86sfjlgr54.gmgdl@evledraar.gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323328-128553218-1666102871=:174" X-Provags-ID: V03:K1:GwpTmQY7K6QM5Koyy6Z7755I4NKE+khUAshNN+5Qc4tkq9OOs6R HMw5FyflOMybcdQY+43HHuVy4db/R0Aj5um8Bm7l5ksgoWt5TmWs7CS+s+bVZREWWs1+d6Z 6rM8/+/r+FHuB0cUxps/44x9RuxarGoGciEZla7D3Ia9qw4NwGoCArMbsxhlZ52RAUGhV7O 16qqGbnzh5r9ujGZQtG1g== X-UI-Out-Filterresults: notjunk:1;V03:K0:ZYH1kF9glCo=:UpGDhbYM9ekKsqZspXMFAq TnyEcVGUpaZHxvlA1jmqbjJ4yjsA/sxKGYpH26vVBFWSG7wispRSODzqmaDUBxv9q9gX0cogd AitbynRjMABqGLSW9JJ5lwI0o58LpH4fYJQMQ674CpUpjJSyn6O34E3VHiDMSo58PfivZO7P4 V/KR6qHMKc85jpOyUt94VG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kU5stIB khxqf6OD1LxSKTWL9N3xMeCyn897j7q1LalNmrq8xkaTCwb2H7Hys6JH+q6/4hYE7YU/Iws4w mYmhcgGDJvPxVOUic/fUyBTgLfNq/6txP26+l9h+4t8z7R1+zHuM8NuLzyOwKB3c0FmeSiFiL YpmJbvoUIyC3Lb/yuDYFfAnuBMZc3kTXuABxOwQfg1QKpOnt7UCwGYrjXetSQ9djndNQRnztn hH18MRh7cVH0l1/iSmw9f58V9FkatyjVpIBm3OekyZyOJdcYEsfZVdtokFVtVntzAm53q0OR0 awtVDivd23X9p5ctHzlDZUF7Qevua61gkfjw9fBQjkvNBSjOGCqsN3zai8yr+61UY3w== Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323328-128553218-1666102871=:174 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi =C3=86var, you did not even give me a chance to send my reply to your original mail ;-) On Tue, 18 Oct 2022, =C3=86var Arnfj=C3=B6r=C3=B0 Bjarmason wrote: > > On Tue, Oct 18 2022, Johannes Schindelin via GitGitGadget wrote: > > > From: Johannes Schindelin > > > > In 7f5397a07c6c (cmake: support for testing git when building out of t= he > > source tree, 2020-06-26), we implemented support for running Git's tes= t > > scripts even after building Git in a different directory than the sour= ce > > directory. > > > > The way we did this was to edit the file `t/test-lib.sh` to override > > `GIT_BUILD_DIR` to point somewhere else than the parent of the `t/` > > directory. > > > > This is unideal because it always leaves a tracked file marked as > > modified, and it is all too easy to commit that change by mistake. > > > > Let's change the strategy by teaching `t/test-lib.sh` to detect the > > presence of a file called `GIT-BUILD-DIR` in the source directory. If = it > > exists, the contents are interpreted as the location to the _actual_ > > build directory. We then write this file as part of the CTest > > definition. > > > > To support building Git via a regular `make` invocation after building > > it using CMake, we ensure that the `GIT-BUILD-DIR` file is deleted (fo= r > > convenience, this is done as part of the Makefile rule that is already > > run with every `make` invocation to ensure that `GIT-BUILD-OPTIONS` is > > up to date). > > > > Signed-off-by: Johannes Schindelin > > Re my earlier feedback, I came up with this as an alternative, which > nicely allows us to have "cmake" and "make" play together, you can even > run them concurrently!: > > https://github.com/avar/git/commit/30f2265fd07aee97ea66f6e84a824d85d241= e245 This approach _still_ modifies the `test-lib.sh`, which is the entire reason for the patch under review. I hope you find an elegant, user-friendly alternative that leaves `test-lib.sh` unmodified even when building via CMake. I would gladly take that and drop my `GIT-BUILD-DIR` patch. Ciao, Johannes --8323328-128553218-1666102871=:174--