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 of
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
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
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-by:
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
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 in the shell script:
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 C, though,
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 the
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.
Though it would
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
---
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 this commit
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
29 matches
Mail list logo