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

Re: [RFC][GSoC] Project proposal: convert interactive rebase to C

From
Christian Couder <christian.couder@gmail.com>
Date
Mar 17, 2018, 20:29 UTC
Message-ID
<CAP8UFD27rWmp5+y8dHgqag=uuU1G_kRFvv1x_XqXk+ur8-HauQ@mail.gmail.com>
In-Reply-To
<2564070.6kGkNsz7Qa@andromeda>
Hi,
On Sat, Mar 17, 2018 at 8:14 PM, Alban Gruin <alban.gruin@gmail.com> wrote:
>
> Weeks 3 & 4 — May 18, 2018 – June 11, 2018
> Then, I would start to rewrite git-rebase--interactive, and get rid of git-
> rebase--helper.

Usually to rewrite a shell script in C, we first rewrite shell functions into option arguments in a C builtin helper and make the schell script call the builtin helper (instead of the original shell functions). Eventually when the shell script is mostly only calling the builtin helper, we add what is needed into the builtin helper and we rename it to make it fully replace the shell script.

See for example 0cce4a2756 (rebase -i -x: add exec commands via the rebase--helper, 2017-12-05) or b903674b35 (bisect--helper: `is_expected_rev` & `check_expected_revs` shell function in C, 2017-09-29). These examples show that we can do step by step rewrites.

I would suggest planning to use the same approach, and describing in your proposal which shell functions you would like to rewrite into the C builtin helper in which order, before planning to fully replace the current git-rebase--interactive.

Thanks, Christian.

Previous: Alban GruinNext: Johannes Schindelin
Message 2 of 8 in “[RFC][GSoC] Project proposal: convert interactive rebase to C”
  1. Alban GruinMar 17, 2018
  2. Christian CouderMar 17, 2018
  3. Johannes SchindelinMar 20, 2018
  4. Alban GruinMar 21, 2018
  5. Johannes SchindelinMar 21, 2018
  6. Alban GruinMar 22, 2018
  7. Christian CouderMar 24, 2018
  8. Alban GruinMar 25, 2018

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.