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

2019-05-18 Thread Duy Nguyen
On Fri, May 17, 2019 at 12:50 AM Ben Avison wrote: > > On 16/05/2019 12:31, Duy Nguyen wrote: > > On Tue, May 14, 2019 at 2:46 AM Ben Avison wrote: > >> > >> When using `git clone --recurse-submodules` there was previously no way to > >> pass a `--remote` switch to the implicit `git submodule upd

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

2019-05-16 Thread Ben Avison
On 16/05/2019 12:31, Duy Nguyen wrote: On Tue, May 14, 2019 at 2:46 AM Ben Avison wrote: When using `git clone --recurse-submodules` there was previously no way to pass a `--remote` switch to the implicit `git submodule update` command for any use case where you want the submodules to be check

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

2019-05-16 Thread Duy Nguyen
On Tue, May 14, 2019 at 2:46 AM Ben Avison wrote: > > When using `git clone --recurse-submodules` there was previously no way to > pass a `--remote` switch to the implicit `git submodule update` command for > any use case where you want the submodules to be checked out on their > remote-tracking b

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

2019-05-14 Thread Ben Avison
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 ed

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

2019-05-13 Thread Ævar Arnfjörð Bjarmason
On Mon, May 13 2019, Ben Avison wrote: > @@ -792,6 +795,11 @@ static int checkout(int submodule_progress) > if (option_verbosity < 0) > argv_array_push(&args, "--quiet"); > > + if (option_remote_submodules == 1) { I see you copied this from code a

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

2019-05-13 Thread Ben Avison
When using `git clone --recurse-submodules` there was previously no way to pass a `--remote` switch to the implicit `git submodule update` command for any use case where you want the submodules to be checked out on their remote-tracking branch rather than with the SHA-1 recorded in the superproject