Re: [PATCH 2/4] submodule: implement `module_name` as a builtin helper
- From
Stefan Beller <sbeller@google.com>
- Date
- Aug 5, 2015, 19:55 UTC
- Message-ID
- <CAGZ79kY=jQSjJUxkznkwwupo527-nT05P_bKXy=GO=E4QjC8tQ@mail.gmail.com>
- In-Reply-To
- <55C25EBB.2000304@web.de>
On Wed, Aug 5, 2015 at 12:06 PM, Jens Lehmann <Jens.Lehmann@web.de> wrote:
Show 17 quoted lines
> Am 05.08.2015 um 02:04 schrieb Stefan Beller: >> >> The goal of this series being rewriting `git submodule update`, >> we don't want to call out to the shell script for config lookups. >> >> So reimplement the lookup of the submodule name in C. > > > Cool. This brings down the duration of the test suite from 3:13 > to 3:12 for me (best of three). > > You might wanna have a look into submodule.c: after initially > calling gitmodules_config() one can lookup the submodule name > in the static "config_name_for_path" string_list. If you'd add > a public method to submodule.c which accesses that string_list > and returns the name for the given path, you won't need your > two new functions ... or am I missing something?
Yes I just realized there is already lots of submodule related code written in C, so I wanted to look at that as the next step and see what can be reused and maybe redo the patches reusing code.