From: Pratik Karki
This commit adds support for the `--exec` option which takes a shell
command-line as argument. This argument will be appended as an `exec
` command after each line in the todo list that creates a commit in
the final history. commands.
Note: while the shell script version
From: Pratik Karki
When running a rebase in non-am mode, it uses the recursive merge to
cherry-pick the commits, and the rebase command allows to configure
the merge strategy to be used in this operation.
This commit adds that support to the builtin rebase.
Signed-off-by: Pratik Karki
Signed
From: Pratik Karki
This commit adds support for `--fork-point` and `--no-fork-point`.
This is converted as-is from `git-legacy-rebase.sh`.
Signed-off-by: Pratik Karki
Signed-off-by: Johannes Schindelin
---
builtin/rebase.c | 11 +++
1 file changed, 11 insertions(+)
diff --git
From: Pratik Karki
To support `--autostash` we introduce a function `apply_autostash()`
just like in `git-legacy-rebase.sh`.
Rather than refactoring and using the same function that exists in
`sequencer.c`, we go a different route here, to avoid clashes with
the sister GSoC project that turns
From: Pratik Karki
This commit introduces the `--allow-empty-message` option to
`builtin/rebase.c`. The motivation behind this option is: if there are
empty messages (which is not allowed in Git by default, but can be
imported from different version control systems), the rebase will fail.
Using
From: Pratik Karki
This option allows to rebase entire histories up to, and including, the
root commit.
The conversion from the shell script is straight-forward, apart from
the fact that we do not have to write an empty tree in C.
Signed-off-by: Pratik Karki
Signed-off-by: Johannes Schindelin
From: Pratik Karki
This commit introduces support for `--gpg-sign` option which is used
to GPG-sign commits.
Signed-off-by: Pratik Karki
Signed-off-by: Johannes Schindelin
---
builtin/rebase.c | 27 +++
1 file changed, 27 insertions(+)
diff --git a/builtin/rebase.c b
From: Pratik Karki
We need this functionality in the builtin rebase.
Note: to make this function truly reusable, we have to switch the call
get_merges_many_dirty() to get_merges_many() because we want the commit
flags to be reset (otherwise, subsequent get_merge_bases() calls would
obtain
From: Pratik Karki
This commit converts more code from the shell script version to the
builtin rebase. In this instance, we just have to be careful to
keep support for passing multiple `--whitespace` options, as the
shell script version does so, too.
Signed-off-by: Pratik Karki
Signed-off
From: Pratik Karki
The mode to rebase non-linear branches is now supported by the builtin
rebase, too.
Signed-off-by: Pratik Karki
Signed-off-by: Johannes Schindelin
---
builtin/rebase.c | 21 +
1 file changed, 21 insertions(+)
diff --git a/builtin/rebase.c b/builtin
From: Pratik Karki
This commit adds support for the `--autosquash` option which is used to
automatically squash the commits marked as `squash` or `fixup` in their
messages. This is converted following `git-legacy-rebase.sh` closely.
This option can also be configured via the Git config setting
From: Pratik Karki
The `--keep-empty` option can be used to keep the commits that do not
change anything from its parents in the result.
While the scripted version uses `interactive_rebase=implied` to indicate
that the rebase needs to use the `git-rebase--interactive` backend in
non-interactive
From: Pratik Karki
This commit adds support for `--ignore-date` which is passed to `git am`
to easily change the dates of the rebased commits.
Signed-off-by: Pratik Karki
Signed-off-by: Johannes Schindelin
---
builtin/rebase.c | 8
1 file changed, 8 insertions(+)
diff --git
From: Pratik Karki
This commit adds support for `--signoff` which is used to add a
`Signed-off-by` trailer to all the rebased commits. The actual
handling is left to the rebase backends.
Signed-off-by: Pratik Karki
Signed-off-by: Johannes Schindelin
---
builtin/rebase.c | 17
From: Pratik Karki
This commit adds support for the `--ignore-whitespace` option
of the rebase command. This option is simply passed to the
`--am` backend.
Signed-off-by: Pratik Karki
Signed-off-by: Johannes Schindelin
---
builtin/rebase.c | 6 ++
1 file changed, 6 insertions(+)
diff
From: Pratik Karki
The `--rerere-autoupdate` option allows rerere to update the index with
resolved conflicts. This commit follows closely the equivalent part of
`git-legacy-rebase.sh`.
Signed-off-by: Pratik Karki
Signed-off-by: Johannes Schindelin
---
builtin/rebase.c | 25
From: Pratik Karki
This option is simply handed down to `git am` by way of setting the
`git_am_opt` variable that is handled by the `git-rebase--am` backend.
Signed-off-by: Pratik Karki
Signed-off-by: Johannes Schindelin
---
builtin/rebase.c | 10 ++
1 file changed, 10 insertions
From: Pratik Karki
With this commit the builtin rebase supports selecting the "rebase
backends" (or "type") `interactive`, `preserve-merges`, and `merge`.
The `state_dir` was already handled according to the rebase type in a
previous commit.
Note that there is one quirk
From: Pratik Karki
In this commit, we add support to fast forward.
Note: we will need the merge base later, therefore the call to
can_fast_forward() really needs to be the first one when testing whether
we can skip the rebase entirely (otherwise, it would make more sense to
skip the possibly
From: Pratik Karki
When running a rebase on a detached HEAD, we currently store the string
"detached HEAD" in options.head_name. That is a faithful translation of
the shell script version, and we still kind of need it for the purposes of
the scripted backends.
It is poor style for
From: Pratik Karki
This commit introduces a rebase option `--quiet`. While `--quiet` is
commonly perceived as opposite to `--verbose`, this is not the case for
the rebase command: both `--quiet` and `--verbose` default to `false` if
neither `--quiet` nor `--verbose` is present.
Despite
From: Pratik Karki
This commit implements support for an --onto argument that is actually a
"symmetric range" i.e. `...`.
The equivalent shell script version of the code offers two different
error messages for the cases where there is no merge base vs more than
one merge base.
Thoug
From: Pratik Karki
This commit adds support for `switch-to` which is used to switch to the
target branch if needed. The equivalent codes found in shell script
`git-legacy-rebase.sh` is converted to builtin `rebase.c`.
Signed-off-by: Pratik Karki
Signed-off-by: Johannes Schindelin
---
builtin
From: Pratik Karki
To run a new rebase, there needs to be a check to assure that no other
rebase is in progress. New rebase operation cannot start until an
ongoing rebase operation completes or is terminated.
Signed-off-by: Pratik Karki
Signed-off-by: Johannes Schindelin
---
builtin/rebase.c
From: Pratik Karki
This commit converts the equivalent part of the shell script
`git-legacy-rebase.sh` to run the pre-rebase hook (unless disabled), and
to interrupt the rebase with error if the hook fails.
Signed-off-by: Pratik Karki
Signed-off-by: Johannes Schindelin
---
builtin/rebase.c
From: Pratik Karki
The `--onto` option is important, as it allows to rebase a range of
commits onto a different base commit (which gave the command its odd
name: "rebase").
This commit introduces options parsing so that different options can
be added in future commits.
Note: As t
From: Pratik Karki
This commit introduces support for the `-v` and `--stat` options of
rebase.
The --stat option can also be configured via the Git config setting
rebase.stat. To support this, we also add a custom rebase_config()
function in this commit that will be used instead of (and falls
From: Pratik Karki
In this commit, we add support to `--force-rebase` option. The
equivalent part of the shell script found in `git-legacy-rebase.sh` is
converted as faithfully as possible to C.
The --force-rebase option ensures that the rebase does not simply
fast-forward even if it could
From: Pratik Karki
This commit reads the index of the repository for rebase and checks
whether the repository is ready for rebase.
Signed-off-by: Pratik Karki
Signed-off-by: Johannes Schindelin
---
builtin/rebase.c | 11 +++
1 file changed, 11 insertions(+)
diff --git a/builtin
other, i.e. they depend on this
order.
Pratik Karki (1):
rebase: default to using the builtin rebase
builtin/rebase.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--
2.18.0
Now that the builtin rebase is feature-complete, we should use it by
default. Let's keep the legacy scripted version around for the time
being; Once the builtin rebase is well-tested enough, we can remove
`git-legacy-rebase.sh`.
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 2 +-
1 file
quot;. All it does is to replace the editor by a dummy one
(`:` is the Unix command that takes arbitrary command-line parameters,
ignores them and simply exits with success).
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/builtin/rebase.c
When trying to rebase onto a direct descendant of HEAD, we can
take a shortcut and fast-forward instead. This commit makes it so.
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 18 ++
1 file changed, 18 insertions(+)
diff --git a/builtin/rebase.c b/builtin/rebase.c
index
The `git rebase` command, when called without the ``
command-line argument, automatically looks for the upstream
branch configured for the current branch.
With this commit, the builtin rebase learned that trick, too.
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 44
While working on the GSoC project to convert the rebase command to a
builtin, the rebase command learned to error out on certain command-line
option combinations that cannot work, such as --whitespace=fix with
--interactive.
This commit converts that code.
Signed-off-by: Pratik Karki
isn't due to my patches) for extra testing other than my system.
The next in line patch series which I'll be sending out today are:
default to builtin rebase: This will turn on the feature-complete builtin
rebase to on.
These patch series are built on top of each other, i.e. they depend on this
orde
In this commit, we pass `--progress` to the `format-patch` command if
stderr is connected to an interactive terminal, unless we're in quiet
mode.
This `--progress` option will be used in `format-patch` to show progress
reports on stderr as patches are generated.
Signed-off-by: Pratik Karki
In the next patch, we will make use of that in the code that
fast-forwards to `onto` whenever possible.
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 33 +
1 file changed, 21 insertions(+), 12 deletions(-)
diff --git a/builtin/rebase.c b/builtin/rebase.c
This commit adds support for `--fork-point` and `--no-fork-point`.
This is converted as-is from `git-legacy-rebase.sh`.
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 11 +++
1 file changed, 11 insertions(+)
diff --git a/builtin/rebase.c b/builtin/rebase.c
index 0b94d2daaa
The mode to rebase non-linear branches is now supported by the builtin
rebase, too.
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 21 +
1 file changed, 21 insertions(+)
diff --git a/builtin/rebase.c b/builtin/rebase.c
index dfb1e6c25b..0b94d2daaa 100644
--- a/builtin
When running a rebase in non-am mode, it uses the recursive merge to
cherry-pick the commits, and the rebase command allows to configure
the merge strategy to be used in this operation.
This commit adds that support to the builtin rebase.
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 57
). This did not matter when the function was
called in `git rev-parse --fork-point` because in that command, the
process definitely did not traverse any commits before exiting.
Signed-off-by: Pratik Karki
---
builtin/merge-base.c | 81
commit.c | 81
This option allows to rebase entire histories up to, and including, the
root commit.
The conversion from the shell script is straight-forward, apart from
the fact that we do not have to write an empty tree in C.
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 31
-message` overrides that behaviour which will allow
the commits having empty messages to continue in rebase operation.
Note: a very recent change made this the default in the shell scripted
`git rebase`, therefore the builtin rebase does the same.
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 7
into a
builtin.
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 117 +++
1 file changed, 109 insertions(+), 8 deletions(-)
diff --git a/builtin/rebase.c b/builtin/rebase.c
index 4437c86513..a6bfa73915 100644
--- a/builtin/rebase.c
+++ b/builtin
the empty
string to `cmd` by default, we *unset* it here because the code looks
nicer and it does not change the behavior.
The `--exec` option requires `--interactive` machinery.
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 18 ++
1 file changed, 18 insertions(+)
diff
This commit introduces support for `--gpg-sign` option which is used
to GPG-sign commits.
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 27 +++
1 file changed, 27 insertions(+)
diff --git a/builtin/rebase.c b/builtin/rebase.c
index 79ba65fd75..cd9caf4841 100644
This commit converts more code from the shell script version to the
builtin rebase. In this instance, we just have to be careful to
keep support for passing multiple `--whitespace` options, as the
shell script version does so, too.
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 23
. To support this, we also add a custom
rebase_config() function in this commit that will be used instead (and
falls back to) git_default_config().
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/builtin/rebase.c b/builtin/rebase.c
when figuring out which backend to use,
the C version needs to use a different route because the backend will
already be chosen during the `parse_options()` call.
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 24
1 file changed, 24 insertions(+)
diff --git a/builtin
This commit adds support for the `--ignore-whitespace` option
of the rebase command. This option is simply passed to the
`--am` backend.
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/builtin/rebase.c b/builtin/rebase.c
index
This option is simply handed down to `git am` by way of setting the
`git_am_opt` variable that is handled by the `git-rebase--am` backend.
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/builtin/rebase.c b/builtin/rebase.c
index
This commit adds support for `--signoff` which is used to add a
`Signed-off-by` trailer to all the rebased commits. The actual
handling is left to the rebase backends.
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 17 +
1 file changed, 17 insertions(+)
diff --git a/builtin
nteractive" rebase, i.e. a rebase that should show the todo
list, while `--preserve-merges` alone is not interactive (and t5520
tests for this via `git pull --rebase=preserve`).
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 37 +
1 file changed,
The `--rerere-autoupdate` option allows rerere to update the index with
resolved conflicts. This commit follows closely the equivalent part of
`git-legacy-rebase.sh`.
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 25 +
1 file changed, 25 insertions(+)
diff --git
This commit adds support for `--ignore-date` which is passed to `git am`
to easily change the dates of the rebased commits.
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 8
1 file changed, 8 insertions(+)
diff --git a/builtin/rebase.c b/builtin/rebase.c
index 7490d215ef
are built on top of each other, i.e. they depend on this
order.
Pratik Karki (18):
builtin rebase: allow selecting the rebase "backend"
builtin rebase: support --signoff
builtin rebase: support --rerere-autoupdate
builtin rebase: support --committer-date-is-author-date
bui
This commit checks for the file `applying` used by `git am` in
`rebase-apply/` and if the file is present it means `git am` is in
progress so it errors out.
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/builtin/rebase.c b/builtin
This commit prevents actions (such as --continue, --skip) from running
when there is no rebase in progress.
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/builtin/rebase.c b/builtin/rebase.c
index e3dd2f511e..1344e071f3 100644
).
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 23 ++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/builtin/rebase.c b/builtin/rebase.c
index 0d805480a1..e3dd2f511e 100644
--- a/builtin/rebase.c
+++ b/builtin/rebase.c
@@ -472,6 +472,8 @@ int cmd_rebase
variables are not actually stored there, such as
`upstream`. The shell script version simply does not set them, but for
consistency, we unset them in the builtin version.
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 115 +--
strbuf.c | 9
hese patch series are built on top of each other, i.e. they depend on this
order.
Pratik Karki (7):
builtin rebase: support --continue
builtin rebase: support --skip
builtin rebase: support --abort
builtin rebase: support --quit
builtin rebase: support --edit-todo and --show-current-patch
This commit teaches the builtin rebase the "abort" action, which a user
can call to roll back a rebase that is in progress.
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 20
1 file changed, 20 insertions(+)
diff --git a/builtin/rebase.c b/builtin/reba
This commit adds the option `--skip` which is used to restart
rebase after skipping the current patch.
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 18 ++
1 file changed, 18 insertions(+)
diff --git a/builtin/rebase.c b/builtin/rebase.c
index 10da4c978b..7a903838b1 100644
With this patch, the builtin rebase handles the `--quit` action which
can be used to abort a rebase without rolling back any changes performed
during the rebase (this is useful when a user forgot that they were in
the middle of a rebase and continued working normally).
Signed-off-by: Pratik Karki
uld really only want a valid,
fully-qualified ref name as value, and NULL for detached HEADs, using
"detached HEAD" for display only. Make it so.
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 11 ---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/builti
To run a new rebase, there needs to be a check to assure that no other
rebase is in progress. New rebase operation cannot start until an
ongoing rebase operation completes or is terminated.
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 48 +++-
1
This commit adds support for `switch-to` which is used to switch to the
target branch if needed. The equivalent codes found in shell script
`git-legacy-rebase.sh` is converted to builtin `rebase.c`.
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 48
if, say, running an interactive
rebase).
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 72
1 file changed, 72 insertions(+)
diff --git a/builtin/rebase.c b/builtin/rebase.c
index afef0b0046..52a218cd18 100644
--- a/builtin/rebase.c
+++ b/builtin
In this commit, we add support to `--force-rebase` option. The
equivalent part of the shell script found in `git-legacy-rebase.sh` is
converted as faithfully as possible to C.
The --force-rebase option ensures that the rebase does not simply
fast-forward even if it could.
Signed-off-by: Pratik
y GSoC mentors since, this is the final
week of GSoC and other GSoC students most likely have submitted their
respective works which will need lots of review.
Pratik Karki (11):
builtin rebase: support --onto
builtin rebase: support `git rebase --onto A...B`
builtin rebase: handle the pre-
) git_default_config().
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 60 ++--
1 file changed, 58 insertions(+), 2 deletions(-)
diff --git a/builtin/rebase.c b/builtin/rebase.c
index 19fa4d3fc4..2d3f1d65fb 100644
--- a/builtin/rebase.c
+++ b/builtin
r approach would be nice,
this would create more complexity than it is of current. Currently, for
simple convenience, the `get_oid_mb()` function is used whose return
value does not discern between those two error conditions.
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 8 +++-
1 file
introduces to the parse_options() call (which
"eats" argv[0]), the argc is now expected to be lower by one after this
patch, compared to before this patch: argv[0] no longer refers to the
command name, but to the first (non-option) command-line parameter.
Signed-off-by: Pratik Karki
---
b
This commit reads the index of the repository for rebase and checks
whether the repository is ready for rebase.
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 11 +++
1 file changed, 11 insertions(+)
diff --git a/builtin/rebase.c b/builtin/rebase.c
index 2d3f1d65fb..afef0b0046
This commit converts the equivalent part of the shell script
`git-legacy-rebase.sh` to run the pre-rebase hook (unless disabled), and
to interrupt the rebase with error if the hook fails.
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 11 +++
1 file changed, 11 insertions(+)
diff
().
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 15 +++
1 file changed, 15 insertions(+)
diff --git a/builtin/rebase.c b/builtin/rebase.c
index b79f9b0a9f..19fa4d3fc4 100644
--- a/builtin/rebase.c
+++ b/builtin/rebase.c
@@ -79,6 +79,10 @@ struct rebase_options {
int root
in the
following commits.
Signed-off-by: Pratik Karki
---
Unchanged since v5.
.gitignore| 1 +
Makefile | 1 +
git-legacy-rebase.sh | 69 ++-
git-rebase--common.sh | 68 ++
4 files changed, 72
the config directly to avoid
messing up the GIT_* environment variables when we need to fall back to
exec()ing the shell script. The test of builtin rebase can be done by
`git -c rebase.useBuiltin=true rebase ...`
Signed-off-by: Pratik Karki
---
Unchanged since v5.
.gitignore
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: refac
ill handle and support all the wonderful rebase
options.
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 365 ++-
1 file changed, 364 insertions(+), 1 deletion(-)
diff --git a/builtin/rebase.c b/builtin/rebase.c
index c44addb2a4..e695d8a
Hi Junio,
On Fri, Aug 3, 2018 at 4:47 AM Junio C Hamano wrote:
>
> * pk/rebase-in-c (2018-07-30) 3 commits
> - builtin/rebase: support running "git rebase "
> - rebase: refactor common shell functions into their own file
> - rebase: start implementing it as a builtin
>
> Rewrite of the
Hi Junio,
During recent development, I found out that `v5` has some issues and shouldn't
be merged into `next`. I implemented more options and ran a couple of regression
tests from which I figured out that certain choices I made in those commits
need to be reconsidered.
During recent
xt commits will handle and support all the wonderful rebase
options.
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 350 ++-
1 file changed, 349 insertions(+), 1 deletion(-)
diff --git a/builtin/rebase.c b/builtin/rebase.c
index c44addb2a4..5863139
in the
following commits.
Signed-off-by: Pratik Karki
---
Unchanged since v4.
.gitignore| 1 +
Makefile | 1 +
git-legacy-rebase.sh | 69 ++-
git-rebase--common.sh | 68 ++
4 files changed, 72
the config directly to avoid
messing up the GIT_* environment variables when we need to fall back to
exec()ing the shell script. The test of builtin rebase can be done by
`git -c rebase.useBuiltin=true rebase ...`
Signed-off-by: Pratik Karki
---
.gitignore| 1
(as pointed out by Duy Nguyen).
- Fix the macro `GIT_PATH_FUNC` which expands to function definition and
doesn't require semicolons (as pointed out by Beat Bolli).
Pratik Karki (3):
rebase: start implementing it as a builtin
rebase: refactor common shell functions into their own file
> +static GIT_PATH_FUNC(merge_dir, "rebase-merge")
>
First of all, I apologize for not replying earlier to your review.
I have already fixed this macro in my local repository.
The new iteration of my patches was being held due to fixup of
`detach_head_to()` and I will soon submit a new iteration of patch
within a day or two.
Thank you for pointing this out.
Cheers,
Pratik Karki
Hi,
On Tue, Jul 10, 2018 at 10:05 PM Alban Gruin wrote:
>
> Hi,
>
> I published a new blog post:
>
> https://blog.pa1ch.fr/posts/2018/07/10/en/gsoc2018-week-10.html
>
Nice work.
Sorry for late notification, my blog is up too.
https://prertik.github.io/post/week-10
Cheers,
Pratik
Hi,
On Mon, Jul 9, 2018 at 3:16 AM Johannes Schindelin
wrote:
>
> Hi Pratik,
>
> On Sun, 8 Jul 2018, Pratik Karki wrote:
>
> > diff --git a/checkout.c b/checkout.c
> > index bdefc888ba..da68915fd7 100644
> > --- a/checkout.c
> > +++ b/checkout.c
>
On Mon, Jul 9, 2018 at 10:27 PM Junio C Hamano wrote:
>
> Pratik Karki writes:
>
> > In the upcoming builtin rebase, we will have to start by detaching
> > the HEAD, just like shell script version does. Essentially, we have
> > to do the same thing as `git ch
Hi,
On Mon, Jul 9, 2018 at 2:21 PM Eric Sunshine wrote:
>
> On Mon, Jul 9, 2018 at 3:59 AM Andrei Rybak wrote:
> > On 2018-07-08 20:01, Pratik Karki wrote:
> > > +static int use_builtin_rebase(void)
> > > +{
> > > + struct child_process cp = CHILD_PROC
ause 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.
The next commits will handle and support all the wonderful rebase
options.
Signed-off-by: Pratik Karki
---
builtin/reba
.
It does not make a huge difference, and the upside is that this closes
a few (unlikely) code paths where the index would not be unlocked upon
error.
Signed-off-by: Pratik Karki
---
checkout.c | 64 +
checkout.h | 3 +++
sequencer.c | 58
in the
following commits.
Signed-off-by: Pratik Karki
---
.gitignore| 1 +
Makefile | 1 +
git-legacy-rebase.sh | 69 ++-
git-rebase--common.sh | 68 ++
4 files changed, 72 insertions(+), 67
the config directly to avoid
messing up the GIT_* environment variables when we need to fall back to
exec()ing the shell script. The test of builtin rebase can be done by
`git -c rebase.useBuiltin=true rebase ...`
Signed-off-by: Pratik Karki
---
.gitignore| 1
a minimal builtin rebase
which supports running `git rebase ` and also serves to ask for
reviews.
Changes since v3:
- Fix commit message of `rebase: start implementing it as a builtin`.
- Acknowledge Junio's style reviews.
- Acknowledge Johannes Schindelin's review.
Pratik Karki (4):
rebase
ause 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.
The next commits will handle and support all the wonderful rebase
options.
Signed-off-by: Pratik Karki
---
builtin/reba
.
It does not make a huge difference, and the upside is that this closes
a few (unlikely) code paths where the index would not be unlocked upon
error.
Signed-off-by: Pratik Karki
---
checkout.c | 64 +
checkout.h | 3 +++
sequencer.c | 58
messing up the GIT_* environment variables when we need to fall back to
exec()ing the shell script. The test of builtin rebase can be done by
`git -c rebase.useBuiltin=true rebase ...`
Signed-off-by: Pratik Karki
---
.gitignore| 1 +
Makefile
1 - 100 of 134 matches
Mail list logo