Rewrite "git rebase" in C.
* pk/rebase-in-c-2-basic:
builtin rebase: support `git rebase <upstream> <switch-to>`
builtin rebase: only store fully-qualified refs in `options.head_name`
builtin rebase: start a new rebase only if none is in progress
builtin rebase: support --force-rebase
builtin rebase: try to fast forward when possible
builtin rebase: require a clean worktree
builtin rebase: support the `verbose` and `diffstat` options
builtin rebase: support --quiet
builtin rebase: handle the pre-rebase hook and --no-verify
builtin rebase: support `git rebase --onto A...B`
builtin rebase: support --onto
#include "cache-tree.h"
#include "unpack-trees.h"
#include "lockfile.h"
+ #include "parse-options.h"
+ #include "commit.h"
+ #include "diff.h"
+ #include "wt-status.h"
+ #include "revision.h"
++#include "commit-reach.h"
+
+ static char const * const builtin_rebase_usage[] = {
+ N_("git rebase [-i] [options] [--exec <cmd>] [--onto <newbase>] "
+ "[<upstream>] [<branch>]"),
+ N_("git rebase [-i] [options] [--exec <cmd>] [--onto <newbase>] "
+ "--root [<branch>]"),
+ N_("git rebase --continue | --abort | --skip | --edit-todo"),
+ NULL
+ };
static GIT_PATH_FUNC(apply_dir, "rebase-apply")
static GIT_PATH_FUNC(merge_dir, "rebase-merge")