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

[PATCH/WIP 0/8] Convert git-rebase.sh to C

From
Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Date
Mar 18, 2015, 09:55 UTC
Message-ID
<1426672547-11369-1-git-send-email-pclouds@gmail.com>

In the spirit of sharing code proactively [1], despite my embarrassment, this is what I got for converting git-rebase.sh to C. Note that this is only about git-rebase.sh, not git-rebase--*.sh. Some changes in git-rebase.sh are pushed back to git-rebase--*.sh. The idea is we convert git-rebase.sh first, then the rest later.

Anybody who wants to base their work on this code, feel free to --reset-author (and take all the bugs with you, I'm sure there are lots of them). This work is from 2013. git-rebase.sh has received lots of updates since then, so there's still lots of work to do.

[1] http://article.gmane.org/gmane.comp.version-control.git/265699
Nguyễn Thái Ngọc Duy (8):
  strbuf: add and use strbuf_read_file_or_die()
  Move reset_tree from builtin/checkout.c to unpack-trees.c
  rebase: turn rebase--am into a separate program
  rebase: turn rebase--merge into a separate program
  rebase: turn rebase--interactive into a separate program
  rebase: remove unused function
  rebase: move resolvemsg to rebase--* scripts
  Build in rebase
 Makefile                                |   8 +-
 builtin.h                               |   1 +
 builtin/blame.c                         |   4 +-
 builtin/checkout.c                      |  40 +-
 builtin/commit.c                        |  16 +-
 builtin/merge.c                         |  32 +-
 builtin/notes.c                         |   4 +-
 builtin/rebase.c (new)                  | 752 ++++++++++++++++++++++++++++++++
 builtin/tag.c                           |   7 +-
 commit.c                                |   4 +-
 commit.h                                |   4 +-
 contrib/examples/git-rebase.sh (new +x) | 532 ++++++++++++++++++++++
 git-rebase--am.sh (mode +x)             |  39 ++
 git-rebase--interactive.sh (mode +x)    |  41 +-
 git-rebase--merge.sh (mode +x)          |  39 ++
 git-rebase.sh (gone)                    | 544 -----------------------
 git.c                                   |   1 +
 strbuf.c                                |   8 +
 strbuf.h                                |   1 +
 unpack-trees.c                          |  33 ++
 unpack-trees.h                          |   4 +
 21 files changed, 1480 insertions(+), 634 deletions(-)
 create mode 100644 builtin/rebase.c
 create mode 100755 contrib/examples/git-rebase.sh
 mode change 100644 => 100755 git-rebase--am.sh
 mode change 100644 => 100755 git-rebase--interactive.sh
 mode change 100644 => 100755 git-rebase--merge.sh
 delete mode 100755 git-rebase.sh
-- 
2.3.0.rc1.137.g477eb31
Next: Nguyễn Thái Ngọc Duy
Message 1 of 9 in “Convert git-rebase.sh to C”
  1. 0/8 Convert git-rebase.sh to CNguyễn Thái Ngọc Duy, Mar 18, 2015
  2. 1/8 strbuf: add and use strbuf_read_file_or_die()Nguyễn Thái Ngọc Duy, Mar 18, 2015
  3. 2/8 Move reset_tree from builtin/checkout.c to unpack-trees.cNguyễn Thái Ngọc Duy, Mar 18, 2015
  4. 3/8 rebase: turn rebase--am into a separate programNguyễn Thái Ngọc Duy, Mar 18, 2015
  5. 4/8 rebase: turn rebase--merge into a separate programNguyễn Thái Ngọc Duy, Mar 18, 2015
  6. 5/8 rebase: turn rebase--interactive into a separate programNguyễn Thái Ngọc Duy, Mar 18, 2015
  7. 6/8 rebase: remove unused functionNguyễn Thái Ngọc Duy, Mar 18, 2015
  8. 7/8 rebase: move resolvemsg to rebase--* scriptsNguyễn Thái Ngọc Duy, Mar 18, 2015
  9. 8/8 Build in rebaseNguyễn Thái Ngọc Duy, Mar 18, 2015

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.