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.7 required=3.0 tests=AWL,BAYES_00, 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 2BE0F1F506 for ; Thu, 22 Sep 2022 05:58:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229519AbiIVF6v (ORCPT ); Thu, 22 Sep 2022 01:58:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229673AbiIVF6t (ORCPT ); Thu, 22 Sep 2022 01:58:49 -0400 Received: from mail-yw1-f181.google.com (mail-yw1-f181.google.com [209.85.128.181]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C3A82B4428 for ; Wed, 21 Sep 2022 22:58:47 -0700 (PDT) Received: by mail-yw1-f181.google.com with SMTP id 00721157ae682-324ec5a9e97so87695037b3.7 for ; Wed, 21 Sep 2022 22:58:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=nfeaAV5cfIeCokcbpcZIjCZtS8RrYwJMUlz2+UwFuqo=; b=OMkAOl7DUKXwPZOsqPEduddSIlc3310cLaNUSgDz3tnk4LmrjHyxPN3xREBX9l/YYb dBG9sHF17+LDZIoGKzM3kw+9g/NgeVo0OI4QCIoErMKJXLUFZ+nZ4Qz4Lfbc7QbJJrPD uvmWO8ZeBqG31fnIz6Z/RPmUq9XuF/HKke96pEAPELMtR+Z9lr3kCzHURrDbBIZ8fkJX K3StPRxkUjc6t7z+7YSxSO3TIN6tShWsLKfDTyesAEaKV2CaRx3XRjnECAO5SRNrhx5G T2AQ+8sWxcHKgqqLNffjVV0mxDH+fRBAV9zfjXJ7epfOJWkFW5jvEyGDzN9Vom8N947O eokA== X-Gm-Message-State: ACrzQf2khNOpux5PgfgaCNQnmweo00pFK3o19nCClF2U9Axa8FlvwL+v cMQoE7bOjj0xPStlM5FzjRYNMw+NmqaNKP0wfJ7OnW03NtX0HfAQ X-Google-Smtp-Source: AMsMyM4BFI9jRQeC/MpnxgrlPHwAA4j+ikxT0WEG9nItjPd81dCYjiiyQGtqt64Pw0LHqh4KnUgYORAC0zpCrnUiztM= X-Received: by 2002:a0d:eb01:0:b0:348:6ee0:7a4 with SMTP id u1-20020a0deb01000000b003486ee007a4mr1636475ywe.493.1663826326880; Wed, 21 Sep 2022 22:58:46 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Eric Sunshine Date: Thu, 22 Sep 2022 01:58:36 -0400 Message-ID: Subject: Re: [PATCH 1/2] clone: allow "--bare" with "-o" To: Jeff King Cc: "John A. Leuenhagen" , Junio C Hamano , Git List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Thu, Sep 22, 2022 at 1:33 AM Jeff King wrote: > [...] > Let's allow the options to be used together, and switch the "forbid" > test in t5606 to check that we use the requested name. That test came > much later in 349cff76de (clone: add tests for --template and some > disallowed option pairs, 2020-09-29), and does not offer any logic > beyond "let's test what the code currently does". > > Signed-off-by: Jeff King > --- > diff --git a/t/t5606-clone-options.sh b/t/t5606-clone-options.sh > @@ -42,11 +42,12 @@ test_expect_success 'rejects invalid -o/--origin' ' > +test_expect_success 'clone --bare -o' ' > + git clone -o foo --bare parent clone-bare-o && > + (cd parent && pwd) >expect && > + git -C clone-bare-o config remote.foo.url >actual && > + test_cmp expect actual > ' Is this safe on Microsoft Windows? My understanding from t/README: When a test checks for an absolute path that a git command generated, construct the expected value using $(pwd) rather than $PWD, $TEST_DIRECTORY, or $TRASH_DIRECTORY. It makes a difference on Windows, where the shell (MSYS bash) mangles absolute path names. For details, see the commit message of 4114156ae9. was that you should use $(pwd) rather than raw `pwd` when comparing against a path generated by Git. Is there a gap in my understanding here?