git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC][PATCH 0/2] submodule: port 'set-url' from shell to C

From
Christian Couder <christian.couder@gmail.com>
Date
Apr 17, 2020, 22:09 UTC
Message-ID
<CAP8UFD1y7D_gSharBE9+CVyQKg3qhXMvtzBjkdYA1Aj3hocBMg@mail.gmail.com>
In-Reply-To
<20200416210456.19122-1-shouryashukla.oo@gmail.com>
Hi,

On Thu, Apr 16, 2020 at 11:05 PM Shourya Shukla <shouryashukla.oo@gmail.com> wrote:

Show 9 quoted lines
> 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.

Previous: Christian CouderNext: Denton Liu
Message 5 of 8 in “submodule: port 'set-url' from shell to C”
  1. Shourya ShuklaApr 16, 2020
  2. 1/2 submodule.c: update URL in .gitmodules using update_url_in_gitmodulesShourya Shukla, Apr 16, 2020
  3. 2/2 submodule: port subcommand 'set-url' from shell to CShourya Shukla, Apr 16, 2020
  4. Christian CouderApr 17, 2020
  5. Christian CouderApr 17, 2020
  6. Denton LiuApr 20, 2020
  7. Shourya ShuklaApr 27, 2020
  8. Denton LiuApr 27, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.