From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-3.3 required=3.0 tests=AWL,BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI shortcircuit=no autolearn=ham autolearn_force=no version=3.4.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id 3A2BE1F597 for ; Tue, 17 Jul 2018 10:09:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729752AbeGQKlT (ORCPT ); Tue, 17 Jul 2018 06:41:19 -0400 Received: from mout.gmx.net ([212.227.15.15]:45645 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729712AbeGQKlT (ORCPT ); Tue, 17 Jul 2018 06:41:19 -0400 Received: from [192.168.0.129] ([37.201.195.94]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0M5cpk-1fyzGo077A-00xbsx; Tue, 17 Jul 2018 12:09:18 +0200 Date: Tue, 17 Jul 2018 12:09:00 +0200 (DST) From: Johannes Schindelin X-X-Sender: virtualbox@gitforwindows.org To: Eric Sunshine cc: Junio C Hamano , Git List , Elijah Newren , Johannes Sixt , Jonathan Nieder , Jonathan Tan , Stefan Beller , Luke Diamand , Jeff King Subject: Re: [PATCH 11/25] t7400: fix broken "submodule add/reconfigure --force" test In-Reply-To: <20180716230535.GA49654@flurp.local> Message-ID: References: <20180702002405.3042-1-sunshine@sunshineco.com> <20180702002405.3042-12-sunshine@sunshineco.com> <20180716230535.GA49654@flurp.local> User-Agent: Alpine 2.21.1 (DEB 209 2017-03-23) MIME-Version: 1.0 Content-Type: text/plain; charset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sdBe98kHTriWgqOw5buSJx8v MZbd4mf Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Hi Eric, On Mon, 16 Jul 2018, Eric Sunshine wrote: > On Mon, Jul 16, 2018 at 02:37:32PM -0700, Junio C Hamano wrote: > > Eric Sunshine writes: > > > On Mon, Jul 16, 2018 at 11:51 AM Johannes Schindelin > > > wrote: > > >> On Mon, 16 Jul 2018, Johannes Schindelin wrote: > > >> > > - git submodule add --force bogus-url submod && > > >> > > + git submodule add --force /bogus-url submod && > > >> > This breaks on Windows because of the absolute Unix-y path having to be > > >> > translated to a Windows path: > > >> > I could imagine that using "$(pwd)/bogus-url" (which will generate a > > >> > Windows-y absolute path on Windows) would work, though. > > >> > > >> Yes, this works indeed, see the patch below. Could you please squash it in > > >> if you send another iteration of your patch series? Junio, could you > > >> please add this as a SQUASH??? commit so that `pu` is fixed on Windows? > > > > > > So, this SQUASH looks like the correct way forward. Hopefully, Junio > > > can just squash it so I don't have to flood the list again with this > > > long series. > > > > The topic already has another dependent topic so rerolling or > > squashing would be a bit cumbersome. I'll see what I could do but > > it may not be until tomorrow's pushout. > > No problem. Here's Dscho's fix in the form of a proper patch if > that makes it easier for you (it just needs his sign-off): > > --- >8 --- > From: Johannes Schindelin > Subject: [PATCH] t7400: make "submodule add/reconfigure --force" work on > Windows > > On Windows, the "Unixy" path /bogus-url gets translated automatically to > a Windows-style path (such as C:/git-sdk/bogus_url). This is normally > not problem, since it's still a valid and usable path in that form, s/not problem/not a problem/ > however, this test wants to do a comparison against the original path. > $(pwd) was invented exactly for this case, so use it to make the path > comparison work. > > [es: commit message] > Signed-off-by: Johannes Schindelin > Signed-off-by: Eric Sunshine > --- > t/t7400-submodule-basic.sh | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh > index 76cf522a08..bfb09dd566 100755 > --- a/t/t7400-submodule-basic.sh > +++ b/t/t7400-submodule-basic.sh > @@ -171,10 +171,11 @@ test_expect_success 'submodule add to .gitignored path with --force' ' > test_expect_success 'submodule add to reconfigure existing submodule with --force' ' > ( > cd addtest-ignore && > - git submodule add --force /bogus-url submod && > + bogus_url="$(pwd)/bogus-url" && > + git submodule add --force "$bogus_url" submod && > git submodule add --force -b initial "$submodurl" submod-branch && > - test "/bogus-url" = "$(git config -f .gitmodules submodule.submod.url)" && > - test "/bogus-url" = "$(git config submodule.submod.url)" && > + test "$bogus_url" = "$(git config -f .gitmodules submodule.submod.url)" && > + test "$bogus_url" = "$(git config submodule.submod.url)" && > # Restore the url > git submodule add --force "$submodurl" submod && > test "$submodurl" = "$(git config -f .gitmodules submodule.submod.url)" && > -- > 2.18.0.233.g985f88cf7e Thanks! Dscho