Re: [GSoC][PATCH 2/6 v2] submodule: port subcommand foreach from shell to C
- From
Christian Couder <christian.couder@gmail.com>
- Date
- Jun 27, 2017, 06:06 UTC
- Message-ID
- <CAP8UFD3WY4KptxphBnNVvOfh8XQYrn5jabzBegx5K07+9PnDtQ@mail.gmail.com>
- In-Reply-To
- <20170626231108.23640-2-pc44800@gmail.com>
On Tue, Jun 27, 2017 at 1:11 AM, Prathamesh Chavan <pc44800@gmail.com> wrote:
Show 9 quoted lines
> + > + if (!is_submodule_populated_gently(list_item->name, NULL)) > + goto cleanup; > + > + prepare_submodule_repo_env(&cp.env_array); > + /* For the purpose of executing <command> in the submodule, > + * separate shell is used for the purpose of running the > + * child process. > + */
As this comment spans over more than one line, it should be like:
/* * first line of comment * second line of comment * more stuff ... */
Also please explain WHY a shell is needed, we can see from the code that we will use a shell. So it should be something like:
/* * Use a shell because ... * and ... */
> + cp.use_shell = 1; > + cp.dir = list_item->name;