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

Re: [PATCH] clone: add `--remote-submodules` flag

From
Ben Avison <bavison@riscosopen.org>
Date
May 14, 2019, 18:38 UTC
Message-ID
<be6f4de9-ee29-f690-3184-1ff7429a0181@riscosopen.org>
In-Reply-To
<87sgtivz2m.fsf@evledraar.gmail.com>
On 13/05/2019 22:12, Ævar Arnfjörð Bjarmason wrote:
Show 7 quoted lines
> 
> On Mon, May 13 2019, Ben Avison wrote:
> 
>> +		if (option_remote_submodules == 1) {
> 
> I see you copied this from code above the context, but to check a bool
> variable just use "if (var)" not "if (var == 1)".

OK. Would you prefer I edit the line above it as well? I simply assumed that was the way it was preferred to perform the test for some reason.

Show 7 quoted lines
>> +test_expect_success 'check the default is --no-remote-submodules' '
>> +	test_when_finished "rm -rf super_clone" &&
>> +	git clone --recurse-submodules --no-remote-submodules "file://$pwd/." super_clone &&
> 
> This isn't testing the default, it just tests --no-remote-submodules,
> i.e. if you change the "static int" assignment to "1" (to make this new
> option the default) all these tests will still pass.

That was a cut-and-paste error - I meant to omit both new options as you suggest! Good spot.

Ben
Previous: Ævar Arnfjörð BjarmasonNext: Ben Avison
Message 3 of 7 in “clone: add `--remote-submodules` flag”
  1. clone: add `--remote-submodules` flagBen Avison, May 13, 2019
  2. Ævar Arnfjörð BjarmasonMay 13, 2019
  3. Ben AvisonMay 14, 2019
  4. clone: add `--remote-submodules` flagBen Avison, May 19, 2019
  5. Duy NguyenMay 16, 2019
  6. Ben AvisonMay 16, 2019
  7. Duy NguyenMay 18, 2019

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.