From: Christian Couder Date: Fri, 17 Apr 2020 22:09:21 GMT Subject: Re: [RFC][PATCH 0/2] submodule: port 'set-url' from shell to C Message-ID: In-Reply-To: <20200416210456.19122-1-shouryashukla.oo@gmail.com> Hi, On Thu, Apr 16, 2020 at 11:05 PM Shourya Shukla wrote: > This is my very first attempt at the conversion of subcommand 'set-url' from shell > to C, thus making the subcommand a builtin. > > I have based my conversion by looking at the way other subcommands have been implemented > in 'submodule--helper.c' as well as the subcommand 'set-url' in 'remote.c'. The approach > I have taken is as follows: > > 1. Create a helper function 'update_url_in_gitmodules()' in 'submodule.c' > to update the URL of an entry in '.gitmodules'. We usually don't add a function that is unused in the commit that adds it. > 2. Port the function 'cmd_set_url()' in 'git-submodule.sh' to 'module_set_url()' > in 'submodule--helper.c'. So it seems to me that you could squash the two commits into one. Thanks, Christian.