Re: [PATCH 1/2] clone: allow "--bare" with "-o"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 22, 2022 at 1:33 AM Jeff King <peff@xxxxxxxx> 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 <peff@xxxxxxxx>
> ---
> 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?



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux