diff options
author | Pratik Karki <predatoramigo@gmail.com> | 2018-08-07 01:16:11 +0545 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-08-06 13:08:01 -0700 |
commit | ac7f467fef8b836084afdce5eded047c79a6858d (patch) | |
tree | 44bb5810721b1fc758d563635d4b2a0760cefa28 /builtin/gc.c | |
parent | rebase: refactor common shell functions into their own file (diff) | |
download | tgif-ac7f467fef8b836084afdce5eded047c79a6858d.tar.xz |
builtin/rebase: support running "git rebase <upstream>"
This patch gives life to the skeleton added in the previous patches:
With this change, we can perform a elementary rebase (without any
options).
It can be tested thusly by:
git -c rebase.usebuiltin=true rebase HEAD~2
The rebase backends (i.e. the shell script functions defined in
`git-rebase--<backend>`) are still at work here and the "builtin
rebase"'s purpose is simply to parse the options and set
everything up so that those rebase backends can do their work.
Note: We take an alternative approach here which is *not* to set the
environment variables via `run_command_v_opt_cd_env()` because those
variables would then be visible by processes spawned from the rebase
backends. Instead, we work hard to set them in the shell script snippet.
On Windows, some of the tests fail merely due to core.fileMode not
being heeded that's why the core.*config variables is parsed here.
The `reset_head()` function is currently only used to detach the HEAD
to onto by way of starting the rebase, but it offers additional
functionality that subsequent patches will need like moving to the
original branch (possibly updating it) and also to do the equivalent of
`git reset --hard`.
The next commits will handle and support all the wonderful rebase
options.
Signed-off-by: Pratik Karki <predatoramigo@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/gc.c')
0 files changed, 0 insertions, 0 deletions