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

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

 



On 13/05/2019 22:12, Ævar Arnfjörð Bjarmason wrote:

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.

+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



[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