checkout -B' to force the creation and
update of these branches.
Signed-off-by: Alban Gruin
---
t/perf/p3400-rebase.sh | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/t/perf/p3400-rebase.sh b/t/perf/p3400-rebase.sh
index ce271ca4c1..d202aaed06 100755
--- a/t/perf/p3400
This makes the structures todo_list and todo_item, and the functions
todo_list_release() and parse_insn_buffer(), accessible outside of
sequencer.c.
Signed-off-by: Alban Gruin
---
sequencer.c | 67 +
sequencer.h | 49
the "logic" functions to avoid useless file
access.
The parsing of the list has to be done by the caller. If the buffer of
the todo list provided by the caller is empty, a `noop' command is
directly added to the todo list, without touching to the buffer.
Signed-off-by: Alban Gruin
---
buil
, the type of the corresponding
command is set to a garbage value, and its argument is defined properly.
This will allow to recreate the text of a todo list from its commands,
even if one of them is incorrect.
Signed-off-by: Alban Gruin
---
No changes since v2.
sequencer.c | 7 ++-
1 file changed
list is edited in the middle of a rebase session).
Signed-off-by: Alban Gruin
---
builtin/rebase--interactive.c | 23 -
rebase-interactive.c | 48 ++-
rebase-interactive.h | 4 ++-
sequencer.c | 3 +--
sequencer.h
This makes sequencer_make_script() write its script to a strbuf (ie. the
buffer of a todo_list) instead of a FILE. This reduce the amount of
read/write made by rebase interactive.
Signed-off-by: Alban Gruin
---
builtin/rebase--interactive.c | 13 +++-
sequencer.c | 38
This replaces a call to error() by a call to error_errno() after writing
the content of the todo list to the disk in transform_todo_file().
Signed-off-by: Alban Gruin
---
No changes since v2.
sequencer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sequencer.c b
As transform_todo_file() is only needed inside of rebase--interactive.c,
it is moved there from sequencer.c.
Signed-off-by: Alban Gruin
---
builtin/rebase--interactive.c | 20
sequencer.c | 20
sequencer.h | 1 -
3
the list.
This also means its buffer cannot be directly written to the disk.
rewrite_file() is then removed, as it is now unused.
Signed-off-by: Alban Gruin
---
sequencer.c | 79 -
1 file changed, 17 insertions(+), 62 deletions(-)
diff --git
() still uses sequencer_add_exec_commands() for now.
This will be changed in a future commit.
Signed-off-by: Alban Gruin
---
builtin/rebase--interactive.c | 15 +++--
sequencer.c | 111 +-
sequencer.h | 4 +-
3 files changed
-interactive.c, and made static again.
Signed-off-by: Alban Gruin
---
No changes since v2.
builtin/rebase--interactive.c | 2 +-
rebase-interactive.c | 90 -
rebase-interactive.h | 1 +
sequencer.c | 120
, but they will be
replaced in a future commit.
todo_list_transform() is not a static function, because it will be used
by edit_todo_list() from rebase-interactive.c in a future commit.
Signed-off-by: Alban Gruin
---
No changes since v2.
builtin/rebase--interactive.c | 2 +-
rebase-interactive.c
s.
Signed-off-by: Alban Gruin
---
rebase-interactive.c | 12 +++-
rebase-interactive.h | 3 ++-
sequencer.c | 17 -
3 files changed, 17 insertions(+), 15 deletions(-)
diff --git a/rebase-interactive.c b/rebase-interactive.c
index 23569cfa3c..3b7b5e3382 100644
--
Just like complete_action(), edit_todo_list() used a
function (transform_todo_file()) that read the todo list from the disk
and wrote it back, resulting in useless disk accesses.
This changes edit_todo_list() to call directly todo_list_write_to_file()
instead.
Signed-off-by: Alban Gruin
().
complete_action() still uses rearrange_squash_in_todo_file() for now.
This will be changed in a future commit.
Signed-off-by: Alban Gruin
---
builtin/rebase--interactive.c | 2 +-
sequencer.c | 87 +--
sequencer.h | 2 +-
3
.
todo_list_write_to_file() can also take care of appending the help text
to the buffer before writing it to the disk, or to write only the first
n items of the list. This feature will be used by
skip_unnecessary_picks(), which has to write done commands in a file.
Signed-off-by: Alban Gruin
This changes complete_action() to use edit_todo_list(), now that it can
handle the initial edit of the todo list.
Signed-off-by: Alban Gruin
---
sequencer.c | 20 ++--
1 file changed, 6 insertions(+), 14 deletions(-)
diff --git a/sequencer.c b/sequencer.c
index f04b002e37
- Replacing calls to memcpy() by shallow copies
- Applying array.cocci.patch
Alban Gruin (16):
sequencer: changes in parse_insn_buffer()
sequencer: make the todo_list structure public
sequencer: refactor transform_todos() to work on a todo_list
sequencer: introduce todo_list_write_t
Hi Phillip,
Le 02/11/2018 à 11:09, Phillip Wood a écrit :
+ struct todo_item *items = NULL,
+ base_item = {TODO_EXEC, NULL, 0, 0, commands_len, 0};
+
+ strbuf_addstr(buf, commands);
+ base_item.offset_in_buf = buf->len - commands_len - 1;
+
Le 30/10/2018 à 17:47, Phillip Wood a écrit :
> On 27/10/2018 22:29, Alban Gruin wrote:
>> This refactors sequencer_add_exec_commands() to work on a todo_list to
>> avoid redundant reads and writes to the disk.
>>
>> An obvious way to do this would be to insert
Hi Phillip,
Le 30/10/2018 à 17:28, Phillip Wood a écrit :
> Hi Alban
>
> I like the direction this is going, it is an improvement on re-scanning
> the list at the end of each function.
>
> On 27/10/2018 22:29, Alban Gruin wrote:
>> This introduce a new function to rec
Hi Junio,
Le 29/10/2018 à 04:05, Junio C Hamano a écrit :
> Alban Gruin writes:
[…]
>> It is based onto ag/rebase-i-in-c (34b4731, "rebase -i: move
>> rebase--helper modes to rebase--interactive").
>
> As there are quite a lot of fixes to the sequencer machinery
is unused, and so is dropped.
todo_list_write_to_file() can also take care to append the help text to
the buffer before writing it to the disk, or to write only the first n
items of the list.
Signed-off-by: Alban Gruin
---
sequencer.c | 59
the "logic" functions to avoid useless file
access.
The parsing of the list has to be done by the caller. If the buffer of
the todo list provided by the caller is empty, a `noop' command is
directly added to the todo list, without touching to the buffer.
Signed-off-by: Alban Gruin
---
buil
This changes complete_action() to use edit_todo_list(), now that it can
handle the initial edit of the todo list.
Signed-off-by: Alban Gruin
---
sequencer.c | 22 +++---
1 file changed, 7 insertions(+), 15 deletions(-)
diff --git a/sequencer.c b/sequencer.c
index a03505f582
list is edited in the middle of a rebase session).
Signed-off-by: Alban Gruin
---
builtin/rebase--interactive.c | 23 -
rebase-interactive.c | 48 ++-
rebase-interactive.h | 4 ++-
sequencer.c | 3 +--
sequencer.h
in a future commit.
Signed-off-by: Alban Gruin
---
sequencer.c | 69 +
1 file changed, 49 insertions(+), 20 deletions(-)
diff --git a/sequencer.c b/sequencer.c
index e12860c047..12a3efeca8 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -4216,6
the list.
This also means its buffer cannot be directly written to the disk.
rewrite_file() is then removed, as it is now unused.
Signed-off-by: Alban Gruin
---
sequencer.c | 80 -
1 file changed, 18 insertions(+), 62 deletions(-)
diff --git
-interactive.c, and made static again.
Signed-off-by: Alban Gruin
---
builtin/rebase--interactive.c | 2 +-
rebase-interactive.c | 90 -
rebase-interactive.h | 1 +
sequencer.c | 120 +++---
sequencer.h
This makes sequencer_make_script() write its script to a strbuf (ie. the
buffer of a todo_list) instead of a FILE. This reduce the amount of
read/write made by rebase interactive.
Signed-off-by: Alban Gruin
---
builtin/rebase--interactive.c | 13 +++-
sequencer.c | 38
s.
Signed-off-by: Alban Gruin
---
rebase-interactive.c | 12 +++-
rebase-interactive.h | 3 ++-
sequencer.c | 16
3 files changed, 17 insertions(+), 14 deletions(-)
diff --git a/rebase-interactive.c b/rebase-interactive.c
index b2be99a900..0643d54b1b 100644
--
Just like complete_action(), edit_todo_list() used a
function (transform_todo_file()) that read the todo list from the disk
and wrote it back, resulting in useless disk accesses.
This changes edit_todo_list() to call directly todo_list_write_to_file()
instead.
Signed-off-by: Alban Gruin
As transform_todo_file() is only needed inside of rebase--interactive.c,
it is moved there from sequencer.c.
Signed-off-by: Alban Gruin
---
builtin/rebase--interactive.c | 20
sequencer.c | 20
sequencer.h | 1 -
3
This replaces a call to error() by a call to error_errno() after writing
the content of the todo list to the disk in transform_todo_file().
Signed-off-by: Alban Gruin
---
No changes since v1, was commit 14/15.
sequencer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
().
complete_action() still uses rearrange_squash_in_todo_file() for now.
This will be changed in a future commit.
Signed-off-by: Alban Gruin
---
builtin/rebase--interactive.c | 2 +-
sequencer.c | 87 +--
sequencer.h | 2 +-
3
, the type of the corresponding
command is set to a garbage value, and its argument is defined properly.
This will allow to recreate the text of a todo list from its commands,
even if one of them is incorrect.
Signed-off-by: Alban Gruin
---
sequencer.c | 7 ++-
1 file changed, 6 insertions(+), 1
, but they will be
replaced in a future commit.
todo_list_transform() is not a static function, because it will be used
by edit_todo_list() from rebase-interactive.c in a future commit.
Signed-off-by: Alban Gruin
---
builtin/rebase--interactive.c | 2 +-
rebase-interactive.c | 4
ion() no longer writes "noop\n" to the todo list buffer
if it is empty. Instead, it appends a `noop' command to the item
list.
Alban Gruin (16):
sequencer: changes in parse_insn_buffer()
sequencer: make the todo_list structure public
sequencer: refactor transform_todos() to wo
This makes the structures todo_list and todo_item, and the functions
todo_list_release() and parse_insn_buffer(), accessible outside of
sequencer.c.
Signed-off-by: Alban Gruin
---
No changes since v1.
sequencer.c | 66 +
sequencer.h | 48
Hi Johannes,
this looks good to me, too!
Cheers,
Alban
Le 19/10/2018 à 20:05, Alban Gruin a écrit :
> Le 19/10/2018 à 14:46, SZEDER Gábor a écrit :
>> On Fri, Oct 19, 2018 at 03:02:22PM +0900, Junio C Hamano wrote:
>>> Two large set of topics on "rebase in C" and "rebase -i in C" are
>>> now in 'next'.
&g
Hi,
Le 19/10/2018 à 14:46, SZEDER Gábor a écrit :
> On Fri, Oct 19, 2018 at 03:02:22PM +0900, Junio C Hamano wrote:
>> Two large set of topics on "rebase in C" and "rebase -i in C" are
>> now in 'next'.
>
> I see occasional failures in 't5520-pull.sh':
>
> […]
>
> When running t5520 in a loop,
Le 12/10/2018 à 11:54, Phillip Wood a écrit :
> On 11/10/2018 17:57, Alban Gruin wrote:
> > Hi Phillip,
> >
> > thanks for taking the time to review my patches.
> >
> > Le 11/10/2018 à 13:25, Phillip Wood a écrit :
> >> On 07/10/2018 20:54, Alban Grui
Le 11/10/2018 à 17:16, Phillip Wood a écrit :
> On 07/10/2018 20:54, Alban Gruin wrote:
>> Just like complete_action(), edit_todo_list() used a
>> function (transform_todo_file()) that read the todo-list from the disk
>> and wrote it back, resulting in useless disk accesse
Le 11/10/2018 à 15:51, Phillip Wood a écrit :
> On 07/10/2018 20:54, Alban Gruin wrote:
>> + if (rewrite_file(todo_file, new_todo.buf.buf, new_todo.buf.len) <
>> 0) {
>> + todo_list_release(_todo);
>> + return error_errno(_(&quo
Hi Phillip,
thanks for taking the time to review my patches.
Le 11/10/2018 à 13:25, Phillip Wood a écrit :
> On 07/10/2018 20:54, Alban Gruin wrote:
>> @@ -4419,15 +4406,38 @@ int sequencer_add_exec_commands(const char
>> *commands)
>> }
>>
Le 07/10/2018 à 21:54, Alban Gruin a écrit :
> At the center of the "interactive" part of the interactive rebase lies
> the todo list. When the user starts an interactive rebase, a todo list
> is generated, presented to the user (who then edits it using a text
&
This makes sequencer_make_script() write its script to a strbuf (ie. the
buffer of a todo_list) instead of a FILE. This reduce the amount of
read/write made by rebase interactive.
Signed-off-by: Alban Gruin
---
builtin/rebase--interactive.c | 13 +++-
sequencer.c | 38
by edit_todo_list() from rebase-interactive.c in a future commit.
Signed-off-by: Alban Gruin
---
builtin/rebase--interactive.c | 2 +-
rebase-interactive.c | 4 +--
sequencer.c | 46 +++
sequencer.h | 3 ++-
4 files
As transform_todo_file() is only needed inside of rebase--interactive.c,
it is moved there from sequencer.c.
Signed-off-by: Alban Gruin
---
builtin/rebase--interactive.c | 21 +
sequencer.c | 21 -
sequencer.h | 1 -
3
the "logic" functions to avoid useless file
access.
Signed-off-by: Alban Gruin
---
builtin/rebase--interactive.c | 13 +-
sequencer.c | 76 +--
sequencer.h | 2 +-
3 files changed, 38 insertions(+), 53 deletions(-)
the disk, parses it, pass the todo_list to todo_list_check(), and
writes it back to the disk.
As get_missing_commit_check_level() and the enum
missing_commit_check_level are no longer needed inside of sequencer.c,
they are moved to rebase-interactive.c, and made static again.
Signed-off-by: Alban
This refactors skip_unnecessary_picks() to work on a todo_list. The
file-handling logic is completely dropped here, as its only usage is
made by complete_action().
Signed-off-by: Alban Gruin
---
sequencer.c | 56 +++--
1 file changed, 16
This makes the structures todo_list and todo_item, and the functions
todo_list_release() and parse_insn_buffer(), accessible outside of
sequencer.c.
Signed-off-by: Alban Gruin
---
sequencer.c | 66 +
sequencer.h | 48
Just like complete_action(), edit_todo_list() used a
function (transform_todo_file()) that read the todo-list from the disk
and wrote it back, resulting in useless disk accesses.
This changes edit_todo_list() to call directly todo_list_transform()
instead.
Signed-off-by: Alban Gruin
---
rebase
This clears the number of items of a todo_list before parsing it to
allow to parse the same list multiple times without issues.
As its items are not dynamically allocated, or don’t need to allocate
memory, no additionnal memory management is required here.
Signed-off-by: Alban Gruin
This replaces a call to error() by a call to error_errno() after writing
the content of the todo list to the disk in transform_todo_file().
Signed-off-by: Alban Gruin
---
sequencer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sequencer.c b/sequencer.c
index 93b9b40f66
s refactor the functions that processes the todo list to work on a
todo_list structure instead of reading it from the disk.
Some commits consists in modifying edit_todo_list() (initially used by
--edit-todo) to handle the initial edition of the todo list, to increase
code sharing.
Alban Gruin (15):
sequen
s.
Signed-off-by: Alban Gruin
---
rebase-interactive.c | 14 --
rebase-interactive.h | 3 ++-
sequencer.c | 8 ++--
3 files changed, 16 insertions(+), 9 deletions(-)
diff --git a/rebase-interactive.c b/rebase-interactive.c
index f42d48e192..7168d56d17 100644
--
it at the end.
Signed-off-by: Alban Gruin
---
sequencer.c | 56 +++--
1 file changed, 33 insertions(+), 23 deletions(-)
diff --git a/sequencer.c b/sequencer.c
index 8dda61927c..6d998f21a4 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -4370,34 +4370,21
This refactors rearrange_squash() to work on a todo_list to avoid
redundant reads and writes. The function is renamed
todo_list_rearrange_squash().
As rebase -p still need to check the todo list from the disk, a new
function is introduced, rearrange_squash_in_todo_file().
Signed-off-by: Alban
This changes complete_action() to use edit_todo_list(), now that it can
handle the initial edit of the todo list.
Signed-off-by: Alban Gruin
---
sequencer.c | 27 +++
1 file changed, 7 insertions(+), 20 deletions(-)
diff --git a/sequencer.c b/sequencer.c
index
edit_todo_list() is changed to work on a todo_list, and to handle the
initial edition of the todo list (ie. making a backup of the todo
list).
It does not check for dropped commits yet, as todo_list_check() does not
work if the old todo list has invalid commands.
Signed-off-by: Alban Gruin
Signed-off-by: Alban Gruin
---
No changes since v7.
t/t3404-rebase-interactive.sh | 10 ++
1 file changed, 10 insertions(+)
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index ff89b6341a..a7fc3cd5be 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3
This rewrites the submodes of interactive rebase (`--continue`,
`--skip`, `--edit-todo`, and `--show-current-patch`) in C.
git-rebase.sh is then modified to call directly git-rebase--interactive2
instead of git-rebase--interactive.sh.
Signed-off-by: Alban Gruin
---
No changes since v7
seem useless as we write "noop" to the todo list
if it is empty. Actually, the todo list might contain commented
commands (ie. empty commits). In this case, complete_action() won’t
write "noop", and will abort without starting the editor.
Signed-off-by: Alban Gruin
---
The chang
Instead of skip_unnecessary_picks() printing its result to stdout, it
returns it into a struct object_id, as the rewrite of complete_action()
(to come in the next commit) will need it.
rebase--helper then is modified to fit this change.
Signed-off-by: Alban Gruin
---
The changes are due
is changed accordingly.
Signed-off-by: Alban Gruin
---
No changes since v7.
builtin/rebase--helper.c | 56 --
git-rebase--interactive.sh | 4 ++-
2 files changed, 56 insertions(+), 4 deletions(-)
diff --git a/builtin/rebase--helper.c b/builtin/rebase--helper.c
commit and `head` is not really meaningful, `onto` is
not used to initialize `shortrevisions` in this case.
The corresponding arguments passed to `--complete-action` are then
dropped, and init_revisions_and_shortrevisions() is stripped from
git-rebase--interactive.sh
Signed-off-by: Alban Gruin
the stategy options is
moved to a new function to allow its use in rebase--helper.c.
Finally, the call to write_basic_state() is removed from
git-rebase--interactive.sh, replaced by a call to `--init-basic-state`.
Signed-off-by: Alban Gruin
---
No changes since v7.
builtin/rebase--helper.c | 28
is modified to call git-rebase--interactive2
instead of git-rebase--helper.
Signed-off-by: Alban Gruin
---
.gitignore | 1 +
Makefile | 1 +
builtin.h | 1 +
builtin/rebase--interactive2.c | 207 +
git
This rewrites init_basic_state() from shell to C. The call to
write_basic_state() in cmd_rebase__helper() is replaced by a call to the
new function.
The shell version is then stripped from git-rebase--interactive.sh.
Signed-off-by: Alban Gruin
---
No changes since v7.
builtin/rebase
as it is useless now.
Signed-off-by: Alban Gruin
---
The changes are due to the rebase, no real changes otherwise.
.gitignore | 1 -
Makefile | 1 -
builtin.h | 1 -
builtin/rebase--helper.c | 226
This removes git-rebase--interactive.sh, as its functionnality has been
replaced by git-rebase--interactive2.
git-rebase--interactive2.c is then renamed to git-rebase--interactive.c.
Signed-off-by: Alban Gruin
---
The changes are due to the rebase, no real changes otherwise.
.gitignore
.
skip_unnecessary_picks() and checkout_onto() becomes static, as they are
only used inside of the sequencer.
Signed-off-by: Alban Gruin
---
No changes since v7.
builtin/rebase--helper.c | 23 ++
git-rebase--interactive.sh | 50 --
rebase-interactive.c
This rewrites checkout_onto() from shell to C.
A new command (“checkout-onto”) is added to rebase--helper.c. The shell
version is then stripped.
Signed-off-by: Alban Gruin
---
No changes since v7.
builtin/rebase--helper.c | 7 ++-
git-rebase--interactive.sh | 25
in favour of a call to the helper.
Signed-off-by: Alban Gruin
---
No changes since v7.
builtin/rebase--helper.c | 13 -
git-rebase--interactive.sh | 11 +--
rebase-interactive.c | 27 +++
rebase-interactive.h | 1 +
4 files changed, 37
(), a call to comment_for_reflog() is added at the
beginning of this function.
Signed-off-by: Alban Gruin
---
No changes since v7.
builtin/rebase--helper.c | 7 ++-
git-rebase--interactive.sh | 16 ++--
sequencer.c| 30 ++
sequencer.h
, append_todo_help() is removed from git-rebase--interactive.sh
to use `rebase--helper --append-todo-help` instead.
Signed-off-by: Alban Gruin
---
The changes are due to the rebase, no real changes otherwise.
Makefile | 1 +
builtin/rebase--helper.c | 11 --
git-rebase
function,
append_todo_help_to_file(). This function will go away after the
rewrite of complete_action().
Signed-off-by: Alban Gruin
---
No changes since v7.
builtin/rebase--helper.c | 2 +-
rebase-interactive.c | 43
rebase-interactive.h | 4
as a parameter, in addition to the path, the buffer and the
environment variables. launch_sequence_editor() is then added to launch
the sequence editor.
Signed-off-by: Alban Gruin
---
No changes since v7.
cache.h | 1 +
editor.c | 27 +--
strbuf.h | 2 ++
3 files changed, 28
to use of
run_command_silent_on_success().
Signed-off-by: Alban Gruin
---
The changes are due to the rebase, no real changes otherwise.
sequencer.c | 51 +--
1 file changed, 25 insertions(+), 26 deletions(-)
diff --git a/sequencer.c b/sequencer.c
20] Conflict solving.
Alban Gruin (20):
sequencer: make three functions and an enum from sequencer.c public
rebase -i: rewrite append_todo_help() in C
editor: add a function to launch the sequence editor
rebase -i: rewrite the edit-todo functionality in C
sequencer: add a new function
will eventually be moved to
rebase-interactive.c and become static again, so no special attention
was given to the naming.
This will be needed for the rewrite of append_todo_help() from shell to
C, as it will be in a new library source file, rebase-interactive.c.
Signed-off-by: Alban Gruin
Signed-off-by: Alban Gruin
---
No changes since v6.
t/t3404-rebase-interactive.sh | 10 ++
1 file changed, 10 insertions(+)
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index 01616901bd..496d88d7d6 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3
as a parameter, in addition to the path, the buffer and the
environment variables. launch_sequence_editor() is then added to launch
the sequence editor.
Signed-off-by: Alban Gruin
---
No changes since v6.
cache.h | 1 +
editor.c | 27 +--
strbuf.h | 2 ++
3 files changed, 28
in favour of a call to the helper.
Signed-off-by: Alban Gruin
---
No changes since v6.
builtin/rebase--helper.c | 13 -
git-rebase--interactive.sh | 11 +--
rebase-interactive.c | 27 +++
rebase-interactive.h | 1 +
4 files changed, 37
as it is useless now.
Signed-off-by: Alban Gruin
---
No changes since v6.
.gitignore | 1 -
Makefile | 1 -
builtin.h | 1 -
builtin/rebase--helper.c | 226 -
builtin/rebase--interactive.c
function,
append_todo_help_to_file(). This function will go away after the
rewrite of complete_action().
Signed-off-by: Alban Gruin
---
No changes since v6.
builtin/rebase--helper.c | 2 +-
rebase-interactive.c | 43
rebase-interactive.h | 4
seem useless as we write "noop" to the todo list
if it is empty. Actually, the todo list might contain commented
commands (ie. empty commits). In this case, complete_action() won’t
write "noop", and will abort without starting the editor.
Signed-off-by: Alban Gruin
---
bu
the stategy options is
moved to a new function to allow its use in rebase--helper.c.
Finally, the call to write_basic_state() is removed from
git-rebase--interactive.sh, replaced by a call to `--init-basic-state`.
Signed-off-by: Alban Gruin
---
No changes since v6.
builtin/rebase--helper.c | 28
.
skip_unnecessary_picks() and checkout_onto() becomes static, as they are
only used inside of the sequencer.
Signed-off-by: Alban Gruin
---
No changes since v6.
builtin/rebase--helper.c | 23 ++
git-rebase--interactive.sh | 50 --
rebase-interactive.c
This rewrites the submodes of interactive rebase (`--continue`,
`--skip`, `--edit-todo`, and `--show-current-patch`) in C.
git-rebase.sh is then modified to call directly git-rebase--interactive2
instead of git-rebase--interactive.sh.
Signed-off-by: Alban Gruin
---
builtin/rebase--interactive2
This rewrites init_basic_state() from shell to C. The call to
write_basic_state() in cmd_rebase__helper() is replaced by a call to the
new function.
The shell version is then stripped from git-rebase--interactive.sh.
Signed-off-by: Alban Gruin
---
No changes since v6.
builtin/rebase
is changed accordingly.
Signed-off-by: Alban Gruin
---
No changes since v6.
builtin/rebase--helper.c | 56 --
git-rebase--interactive.sh | 4 ++-
2 files changed, 56 insertions(+), 4 deletions(-)
diff --git a/builtin/rebase--helper.c b/builtin/rebase--helper.c
is modified to call git-rebase--interactive2
instead of git-rebase--helper.
Signed-off-by: Alban Gruin
---
.gitignore | 1 +
Makefile | 1 +
builtin.h | 1 +
builtin/rebase--interactive2.c | 206 +
git
This removes git-rebase--interactive.sh, as its functionnality has been
replaced by git-rebase--interactive2.
git-rebase--interactive2.c is then renamed to git-rebase--interactive.c.
Signed-off-by: Alban Gruin
---
No changes since v6.
.gitignore| 1
commit and `head` is not really meaningful, `onto` is
not used to initialize `shortrevisions` in this case.
The corresponding arguments passed to `--complete-action` are then
dropped, and init_revisions_and_shortrevisions() is stripped from
git-rebase--interactive.sh
Signed-off-by: Alban Gruin
Instead of skip_unnecessary_picks() printing its result to stdout, it
returns it into a struct object_id, as the rewrite of complete_action()
(to come in the next commit) will need it.
rebase--helper then is modified to fit this change.
Signed-off-by: Alban Gruin
---
No changes since v6
This rewrites checkout_onto() from shell to C.
A new command (“checkout-onto”) is added to rebase--helper.c. The shell
version is then stripped.
Signed-off-by: Alban Gruin
---
No changes since v6.
builtin/rebase--helper.c | 7 ++-
git-rebase--interactive.sh | 25
1 - 100 of 315 matches
Mail list logo