From: Stefan Beller Date: Wed, 05 Aug 2015 19:55:30 GMT Subject: Re: [PATCH 2/4] submodule: implement `module_name` as a builtin helper Message-ID: In-Reply-To: <55C25EBB.2000304@web.de> On Wed, Aug 5, 2015 at 12:06 PM, Jens Lehmann wrote: > 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.