git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] clone: Allow combining --bare and --origin

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 4, 2021, 01:16 UTC
Message-ID
<xmqqzgtyqa9q.fsf@gitster.g>
In-Reply-To
<20210802174944.53745-1-oystwa@gmail.com>
Øystein Walle <oystwa@gmail.com> writes:
Show 20 quoted lines
> diff --git a/t/t5606-clone-options.sh b/t/t5606-clone-options.sh
> index 3a595c0f82..c40dde816d 100755
> --- a/t/t5606-clone-options.sh
> +++ b/t/t5606-clone-options.sh
> @@ -30,12 +30,12 @@ test_expect_success 'rejects invalid -o/--origin' '
>  
>  '
>  
> -test_expect_success 'disallows --bare with --origin' '
> -
> -	test_must_fail git clone -o foo --bare parent clone-bare-o 2>err &&
> -	test_debug "cat err" &&
> -	test_i18ngrep -e "--bare and --origin foo options are incompatible" err
> +test_expect_success '--bare works with -o/--origin' '
>  
> +	git clone --bare --origin=somewhere parent clone-bare &&
> +	url="$(git -C clone-bare config --local remote.somewhere.url)" &&
> +	test -n "$url" &&
> +	test_must_fail git -C clone-bare config --local remote.origin.url
>  '

This breaks a later step that creates clone-bare as this used to use clone-bare-o and the name was available.

Using clone-bare-o as it used to would probably be the easiest fix.
>  
>  test_expect_success 'disallows --bare with --separate-git-dir' '
Previous: Roman Neuhauser
Message 13 of 13 in “clone: Remove constraint on --bare and --origin”
  1. clone: Remove constraint on --bare and --originØystein Walle, Aug 1, 2021
  2. Junio C HamanoAug 2, 2021
  3. Ævar Arnfjörð BjarmasonAug 2, 2021
  4. clone: Allow combining --bare and --originØystein Walle, Aug 2, 2021
  5. Junio C HamanoAug 3, 2021
  6. Øystein WalleAug 4, 2021
  7. Junio C HamanoAug 4, 2021
  8. Roman NeuhauserAug 6, 2021
  9. Junio C HamanoAug 6, 2021
  10. Roman NeuhauserAug 7, 2021
  11. Re* [PATCH v2] clone: Allow combining --bare and --originJunio C Hamano, Aug 7, 2021
  12. Roman NeuhauserAug 8, 2021
  13. Junio C HamanoAug 4, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.