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 32DCA1F597 for ; Mon, 16 Jul 2018 14:43:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727387AbeGPPLe (ORCPT ); Mon, 16 Jul 2018 11:11:34 -0400 Received: from mout.gmx.net ([212.227.17.22]:53125 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727150AbeGPPLd (ORCPT ); Mon, 16 Jul 2018 11:11:33 -0400 Received: from [192.168.0.129] ([37.201.195.94]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0M2ojS-1fw38t0AJ4-00scJ0; Mon, 16 Jul 2018 16:43:33 +0200 Date: Mon, 16 Jul 2018 16:43:30 +0200 (DST) From: Johannes Schindelin X-X-Sender: virtualbox@gitforwindows.org To: Eric Sunshine cc: git@vger.kernel.org, Elijah Newren , Johannes Sixt , Jonathan Nieder , Jonathan Tan , Stefan Beller , Junio C Hamano , Luke Diamand , Jeff King Subject: Re: [PATCH 11/25] t7400: fix broken "submodule add/reconfigure --force" test In-Reply-To: <20180702002405.3042-12-sunshine@sunshineco.com> Message-ID: References: <20180702002405.3042-1-sunshine@sunshineco.com> <20180702002405.3042-12-sunshine@sunshineco.com> User-Agent: Alpine 2.21.1 (DEB 209 2017-03-23) MIME-Version: 1.0 Content-Type: text/plain; charset=US-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bTXM6ggrdKJWd9OVQtsQKLKxmc Fm05X7E Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Hi Eric, On Sun, 1 Jul 2018, Eric Sunshine wrote: > This test has been dysfunctional since it was added by 619acfc78c > (submodule add: extend force flag to add existing repos, 2016-10-06), > however, two problems early in the test went unnoticed due to a broken > &&-chain later in the test. > > First, it tries configuring the submodule with repository "bogus-url", > however, "git submodule add" insists that the repository be either an > absolute URL or a relative pathname requiring prefix "./" or "../" (this > is true even with --force), but "bogus-url" does not meet those > criteria, thus the command fails. > > Second, it then tries configuring a submodule with a path which is > .gitignore'd, which is disallowed. This restriction can be overridden > with --force, but the test neglects to use that option. > > Fix both problems, as well as the broken &&-chain behind which they hid. > > Reviewed-by: Stefan Beller > Signed-off-by: Eric Sunshine > --- > t/t7400-submodule-basic.sh | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh > index 812db137b8..401adaed32 100755 > --- a/t/t7400-submodule-basic.sh > +++ b/t/t7400-submodule-basic.sh > @@ -171,12 +171,12 @@ 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 && > - git submodule add -b initial "$submodurl" submod-branch && > - test "bogus-url" = "$(git config -f .gitmodules submodule.submod.url)" && > - test "bogus-url" = "$(git config submodule.submod.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)" && > # Restore the url > - git submodule add --force "$submodurl" submod > + git submodule add --force "$submodurl" submod && > test "$submodurl" = "$(git config -f .gitmodules submodule.submod.url)" && > test "$submodurl" = "$(git config submodule.submod.url)" > ) This breaks on Windows because of the absolute Unix-y path having to be translated to a Windows path: https://git-for-windows.visualstudio.com/git/git%20Team/_build/results?buildId=12365&view=logs (In this case, it is prefixed with `C:/git-sdk-64-ci` because that is the pseudo root when running in a Git for Windows SDK that is installed into that directory.) I could imagine that using "$(pwd)/bogus-url" (which will generate a Windows-y absolute path on Windows) would work, though. Ciao, Dscho