Re: [GSoC][PATCH v5 3/3] submodule: port subcommand foreach from shell to C
- From
Stefan Beller <sbeller@google.com>
- Date
- May 26, 2017, 16:14 UTC
- Message-ID
- <CAGZ79kasjuXBD8GmAF5n9Fy6WUbPsQt89th=k2tm_+KeV2ss2Q@mail.gmail.com>
- In-Reply-To
- <20170526151713.10974-3-pc44800@gmail.com>
On Fri, May 26, 2017 at 8:17 AM, Prathamesh Chavan <pc44800@gmail.com> wrote:
> This aims to make git-submodule foreach a builtin.
Cool. I reviewed the code and only have one minor nit.
> +static void runcommand_in_submodule(const struct cache_entry *list_item,
> + void *cb_data)
> +{> + /* Only loads from .gitmodules, no overlay with .git/config */ > + gitmodules_config();
Performance nit: We only need to load the gitmodules file once instead of foreach submodule separately, so we could move this to module_foreach().
Thanks, Stefan