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

[GSoC] [PATCH v2 0/4] rebase: rewrite rebase in C

From
Pratik Karki <predatoramigo@gmail.com>
Date
Jul 2, 2018, 09:15 UTC
Message-ID
<20180702091509.15950-1-predatoramigo@gmail.com>
In-Reply-To
<20180628074655.5756-1-predatoramigo@gmail.com>
As a GSoC project, I have been working on the builtin rebase.

The motivation behind the rewrite of rebase i.e. from shell script to C are for following reasons:

1.  Writing shell scripts and getting it to production is much faster
    than doing the equivalent in C but lacks in performance and extra
    workarounds are needed for non-POSIX platforms.
2.  Git for Windows is at loss as the installer size increases due to
    addition of extra dependencies for the shell scripts which are usually
    available in POSIX compliant platforms.

This series of patches serves to demonstrate a minimal builtin rebase which supports running `git rebase <upstream>` and also serves to ask for reviews.

Changes since v1:
  -  Remove the TODO-rebase.sh which shouldn't be merged into `pu`.
  -  Add newline at the end of the file `builtin/rebase.c` in
     `rebase: start implementing it as a builtin`.
  -  Fix unintentional ordering in `git-rebase--common.sh` and fix the commit
     message in `rebase: refactor common shell functions into their own file`.
  -  Fix wrong expression of `argc` in the handle upstream loop, fix wrong
     type casting code, make the condition simple and fix commit message in
     `builtin/rebase: support running "git-rebase <upstream>".
Pratik Karki (4):
  rebase: start implementing it as a builtin
  rebase: refactor common shell functions into their own file
  sequencer: refactor the code to detach HEAD to checkout.c
  builtin/rebase: support running "git rebase <upstream>"
 .gitignore                            |   2 +
 Makefile                              |   4 +-
 builtin.h                             |   1 +
 builtin/rebase.c                      | 282 ++++++++++++++++++++++++++
 checkout.c                            |  64 ++++++
 checkout.h                            |   3 +
 git-rebase.sh => git-legacy-rebase.sh |  62 +-----
 git-rebase--common.sh                 |  61 ++++++
 git.c                                 |   6 +
 sequencer.c                           |  58 +-----
 10 files changed, 428 insertions(+), 115 deletions(-)
 create mode 100644 builtin/rebase.c
 rename git-rebase.sh => git-legacy-rebase.sh (91%)
 create mode 100644 git-rebase--common.sh
-- 
2.18.0
Previous: Stefan BellerNext: Pratik Karki
Message 15 of 61 in “rebase: rewrite rebase in C”
  1. Pratik KarkiJun 28, 2018
  2. 1/5 Start TODO-rebase.shPratik Karki, Jun 28, 2018
  3. Pratik KarkiJun 28, 2018
  4. 2/5 rebase: start implementing it as a builtinPratik Karki, Jun 28, 2018
  5. Christian CouderJun 28, 2018
  6. Stefan BellerJun 28, 2018
  7. 3/5 rebase: refactor common shell functions into their own filePratik Karki, Jun 28, 2018
  8. Christian CouderJun 28, 2018
  9. Stefan BellerJun 28, 2018
  10. 4/5 sequencer: refactor the code to detach HEAD to checkout.cPratik Karki, Jun 28, 2018
  11. Christian CouderJun 28, 2018
  12. Stefan BellerJun 28, 2018
  13. 5/5 builtin/rebase: support running "git rebase <upstream>"Pratik Karki, Jun 28, 2018
  14. Stefan BellerJun 28, 2018
  15. [GSoC] [PATCH v2 0/4] rebase: rewrite rebase in CPratik Karki, Jul 2, 2018
  16. 1/4 rebase: start implementing it as a builtinPratik Karki, Jul 2, 2018
  17. Junio C HamanoJul 3, 2018
  18. 2/4 rebase: refactor common shell functions into their own filePratik Karki, Jul 2, 2018
  19. Junio C HamanoJul 3, 2018
  20. 3/4 sequencer: refactor the code to detach HEAD to checkout.cPratik Karki, Jul 2, 2018
  21. Junio C HamanoJul 3, 2018
  22. 4/4 builtin/rebase: support running "git rebase <upstream>"Pratik Karki, Jul 2, 2018
  23. Junio C HamanoJul 3, 2018
  24. [GSoC] [PATCH v3 0/4] rebase: rewrite rebase in CPratik Karki, Jul 6, 2018
  25. 1/4 rebase: start implementing it as a builtinPratik Karki, Jul 6, 2018
  26. Junio C HamanoJul 6, 2018
  27. 2/4 rebase: refactor common shell functions into their own filePratik Karki, Jul 6, 2018
  28. Johannes SchindelinJul 6, 2018
  29. 3/4 sequencer: refactor the code to detach HEAD to checkout.cPratik Karki, Jul 6, 2018
  30. 4/4 builtin/rebase: support running "git rebase <upstream>"Pratik Karki, Jul 6, 2018
  31. Junio C HamanoJul 6, 2018
  32. Christian CouderJul 7, 2018
  33. Johannes SchindelinJul 7, 2018
  34. Junio C HamanoJul 7, 2018
  35. Beat BolliJul 17, 2018
  36. Beat BolliJul 17, 2018
  37. [GSoC] [PATCH v4 0/4] rebase: rewrite rebase in CPratik Karki, Jul 8, 2018
  38. 1/4 rebase: start implementing it as a builtinPratik Karki, Jul 8, 2018
  39. Andrei RybakJul 9, 2018
  40. Eric SunshineJul 9, 2018
  41. Pratik KarkiJul 9, 2018
  42. Duy NguyenJul 22, 2018
  43. 2/4 rebase: refactor common shell functions into their own filePratik Karki, Jul 8, 2018
  44. 3/4 sequencer: refactor the code to detach HEAD to checkout.cPratik Karki, Jul 8, 2018
  45. Johannes SchindelinJul 8, 2018
  46. Pratik KarkiJul 9, 2018
  47. Junio C HamanoJul 9, 2018
  48. Pratik KarkiJul 9, 2018
  49. 4/4 builtin/rebase: support running "git rebase <upstream>"Pratik Karki, Jul 8, 2018
  50. Johannes SchindelinJul 8, 2018
  51. Johannes SchindelinJul 8, 2018
  52. [GSoC] [PATCH v5 0/3] rebase: rewrite rebase in CPratik Karki, Jul 30, 2018
  53. 1/3 rebase: start implementing it as a builtinPratik Karki, Jul 30, 2018
  54. 2/3 rebase: refactor common shell functions into their own filePratik Karki, Jul 30, 2018
  55. 3/3 builtin/rebase: support running "git rebase <upstream>"Pratik Karki, Jul 30, 2018
  56. Pratik KarkiAug 1, 2018
  57. [GSoC] [PATCH v6 0/3] rebase: rewrite rebase in CPratik Karki, Aug 6, 2018
  58. [GSoC] [PATCH v6 3/3] builtin/rebase: support running "git rebase <upstream>"Pratik Karki, Aug 6, 2018
  59. Junio C HamanoAug 16, 2018
  60. [GSoC] [PATCH v6 2/3] rebase: refactor common shell functions into their own filePratik Karki, Aug 6, 2018
  61. [GSoC] [PATCH v6 1/3] rebase: start implementing it as a builtinPratik Karki, Aug 6, 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.