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.

This is only the first patch series, with  many more to come.
I have finished the conversion, but I want to organize the patches in a neat
patch series to make review process more pleasant, and you can see the progress
at <https://github.com/git/git/pull/505>.

The organization of patches is also almost done. After the follow-up patches,
the rebase operation will be handled completely by this `builtin/rebase.c`.

Changes since v5:

  -  Fix `builtin/rebase: support running "git rebase <upstream>"` as it
     does not need to switch to another branch and only needs to detach the
     `HEAD` for now.

  -  The `reset_head()` function is introduced in
     `builtin/rebase: support running "git rebase <upstream>"`
     which is only used to detach the `HEAD` to `onto` for starting the rebase,
     but upcoming patches will add more functionality like moving or updating to
     original branch.

  -  Lots of changes that fix bugs discovered while getting the test suite to 
pass
     with the patch series.

Pratik Karki (3):
  rebase: start implementing it as a builtin
  rebase: refactor common shell functions into their own file
  builtin/rebase: support running "git rebase <upstream>"

 .gitignore                            |   2 +
 Makefile                              |   4 +-
 builtin.h                             |   1 +
 builtin/rebase.c                      | 421 ++++++++++++++++++++++++++
 git-rebase.sh => git-legacy-rebase.sh |  69 +----
 git-rebase--common.sh                 |  68 +++++
 git.c                                 |   6 +
 7 files changed, 503 insertions(+), 68 deletions(-)
 create mode 100644 builtin/rebase.c
 rename git-rebase.sh => git-legacy-rebase.sh (90%)
 create mode 100644 git-rebase--common.sh

-- 
2.18.0

Reply via email to