/rebase-i-rewrite-todo, and does not conflict
with pu (as of 2018-06-21).
Changes since v2:
- Removing the “verbose” parameter to run_command_silent_on_success()
- Rewording some parts of the second commit
- Changing the help for the “--verbose” flag
Alban Gruin (3):
sequencer: add a new
use of
run_command_silent_on_success().
Signed-off-by: Alban Gruin
---
sequencer.c | 49 -
1 file changed, 24 insertions(+), 25 deletions(-)
diff --git a/sequencer.c b/sequencer.c
index 7cc76332e..51c8ab7ac 100644
--- a/sequencer.c
+++ b
comment_for_reflog() is added at the
beginning of this function.
Signed-off-by: Alban Gruin
---
builtin/rebase--helper.c | 9 +++--
git-rebase--interactive.sh | 16 ++--
sequencer.c| 30 ++
sequencer.h| 3 +++
4 files
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
---
builtin/rebase--helper.c | 7 ++-
git-rebase--interactive.sh | 25 -
sequencer.c
Hi Junio,
Le 22/06/2018 à 00:03, Junio C Hamano a écrit :
> Alban Gruin writes:
> > This adds a new function, run_command_silent_on_success(), to
> > redirect the stdout and stderr of a command to a strbuf, and then to run
> > that command. This strbuf is printed only if the
Hi Junio,
Le 22/06/2018 à 18:27, Junio C Hamano a écrit :
> Alban Gruin writes:
> > This rewrites (the misnamed) setup_reflog_action() from shell to C. The
> > new version is called checkout_base_commit().
>
> ;-) on the "misnamed" part. Indeed, setting up the co
`run_git_checkout()` will also be used in the next commit,
therefore its code is not part of `detach_onto()`.
The shell version is then stripped in favour of a call to the helper.
Signed-off-by: Alban Gruin
---
builtin/rebase--helper.c | 9 +++--
git-rebase--interactive.sh | 13
checkout_onto().
Signed-off-by: Alban Gruin
---
sequencer.c | 51 +--
1 file changed, 25 insertions(+), 26 deletions(-)
diff --git a/sequencer.c b/sequencer.c
index 7cc76332e..9a9725e23 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -766,6 +766,23
()
- Renaming checkout_base_commit() (rewrite of setup_reflog_action()) to
checkout_onto()
- Using the `else` keyword to call run_command_silent_on_success() or
run_command() in run_git_commit() and run_git_checkout().
Alban Gruin (3):
sequencer: extract a function to silence a command, except if
comment_for_reflog() is added at the
beginning of this function.
If the commit OID provided to checkout_onto() is empty, nothing happens
and no errors are returned, otherwise it would break some
tests (t3404.92 and t3404.93).
Signed-off-by: Alban Gruin
---
builtin/rebase--helper.c | 6
Hi Junio,
Le 25/06/2018 à 17:34, Junio C Hamano a écrit :
> Alban Gruin writes:
>
>> Hi Junio,
>>
>> Le 22/06/2018 à 18:27, Junio C Hamano a écrit :
>>> Alban Gruin writes:
>>>> This rewrites (the misnamed) setup_reflog_action() fr
Hi,
I published my blog post about last week:
https://blog.pa1ch.fr/posts/2018/06/25/en/gsoc2018-week-8.html
Cheers,
Alban
Currently, append_todo_help() does not warn the user if an error occurs
when trying to write to the todo file. This patch addresses this
problem.
This patch is based on ag/rebase-i-append-todo-help.
Alban Gruin (1):
sequencer: print an error message if append_todo_help() fails
sequencer.c
This adds an error when append_todo_help() fails to write its message to
the todo file.
Signed-off-by: Alban Gruin
---
sequencer.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/sequencer.c b/sequencer.c
index 7cc76332e..7c4bdbb99 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -4380,6
in C.
This is based on next, as of 2018-06-26.
Changes since v3:
- Show an error message when append_todo_help() fails to edit the todo
list.
- Introducing rebase-interactive.c to contain functions necessary for
interactive rebase.
Alban Gruin (2):
sequencer: make two functions and
, append_todo_help() is removed from git-rebase--interactive.sh
to use `rebase--helper --append-todo-help` instead.
Signed-off-by: Alban Gruin
---
Makefile | 1 +
builtin/rebase--helper.c | 11 --
git-rebase--interactive.sh | 52 ++---
rebase-interactive.c
This makes rebase_path_todo(), get_missign_commit_check_level() and the
enum check_level accessible outside sequencer.c. 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
favour of a call to the helper.
Signed-off-by: Alban Gruin
---
builtin/rebase--helper.c | 13 -
git-rebase--interactive.sh | 11 +--
rebase-interactive.c | 31 +++
rebase-interactive.h | 1 +
4 files changed, 41 insertions(+), 15
-rebase.c.
Alban Gruin (2):
editor: add a function to launch the sequence editor
rebase-interactive: rewrite the edit-todo functionality in C
builtin/rebase--helper.c | 13 -
cache.h| 1 +
editor.c | 27 +--
git-rebase
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
---
cache.h | 1 +
editor.c | 27 +--
strbuf.h | 2 ++
3 files changed, 28 insertions(+), 2
Hi Johannes,
Le 26/06/2018 à 23:41, Johannes Schindelin a écrit :
> Hi Alban,
>
> On Tue, 26 Jun 2018, Alban Gruin wrote:
>
>> diff --git a/sequencer.h b/sequencer.h
>> index c5787c6b5..08397b0d1 100644
>> --- a/sequencer.h
>> +++ b/sequencer.h
&g
Hi Johannes,
Le 26/06/2018 à 23:37, Johannes Schindelin a écrit :
> Hi Alban,
>
> On Tue, 26 Jun 2018, Alban Gruin wrote:
>
>> This patch rewrites append_todo_help() from shell to C. The C version
>> covers a bit more than the old shell version. To achieve that, some
>
in C.
This is based on next, as of 2018-06-28.
Changes since v4:
- Renaming enumeration check_level and its values to avoid namespace
pollution.
Alban Gruin (2):
sequencer: make two functions and an enum from sequencer.c public
rebase--interactive: rewrite append_todo_help() in C
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
---
sequencer.c | 22 +-
sequencer.h | 8
2 files changed, 17 insertions(+), 13 deletions(-)
diff --git a/sequencer.c b/sequencer.c
index
, append_todo_help() is removed from git-rebase--interactive.sh
to use `rebase--helper --append-todo-help` instead.
Signed-off-by: Alban Gruin
---
Makefile | 1 +
builtin/rebase--helper.c | 11 --
git-rebase--interactive.sh | 52 ++---
rebase-interactive.c
Hi Junio,
Le 28/06/2018 à 23:40, Junio C Hamano a écrit :
> * ag/rebase-i-append-todo-help (2018-06-14) 2 commits
> - rebase--interactive: rewrite append_todo_help() in C
> - Merge branch 'ag/rebase-p' into ag/rebase-i-append-todo-help
> (this branch is used by ag/rebase-i-rewrite-todo.)
>
>
call to comment_for_reflog() is added at the
beginning of this function.
Signed-off-by: Alban Gruin
---
builtin/rebase--helper.c | 9 +++--
git-rebase--interactive.sh | 16 ++--
sequencer.c| 31 +++
sequencer.h| 3
(),
and not to checkout_onto().
Alban Gruin (3):
sequencer: add a new function to silence a command, except if it
fails.
rebase -i: rewrite setup_reflog_action() in C
rebase -i: rewrite checkout_onto() in C
builtin/rebase--helper.c | 14 -
git-rebase--interactive.sh | 39
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
---
builtin/rebase--helper.c | 7 ++-
git-rebase--interactive.sh | 25 -
sequencer.c
use of
run_command_silent_on_success().
Signed-off-by: Alban Gruin
---
sequencer.c | 51 +--
1 file changed, 25 insertions(+), 26 deletions(-)
diff --git a/sequencer.c b/sequencer.c
index cb7ec9807..d9545b366 100644
--- a/sequencer.c
+++ b
Hi Junio,
Le 29/06/2018 à 20:23, Junio C Hamano a écrit :
> Junio C Hamano writes:
>
>> Let's aggregate these topics into a single topic, and perhaps call
>> it ag/rebase-i-in-c or something like that. Pretending as if they
>> are separately replaceable does not make much sense, as you are not
when append_todo_help() fails to edit the todo
list.
- Renaming enumeration check_level and its values to avoid namespace
pollution.
- Moving append_todo_help() and edit_todo() from sequencer.c to
interactive-rebase.c.
Alban Gruin (7):
sequencer: make two functions and an enum from
, append_todo_help() is removed from git-rebase--interactive.sh
to use `rebase--helper --append-todo-help` instead.
Signed-off-by: Alban Gruin
---
Makefile | 1 +
builtin/rebase--helper.c | 11 --
git-rebase--interactive.sh | 52 ++---
rebase-interactive.c
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
---
sequencer.c | 22 +-
sequencer.h | 8
2 files changed, 17 insertions(+), 13 deletions(-)
diff --git a/sequencer.c b/sequencer.c
index
favour of a call to the helper.
Signed-off-by: Alban Gruin
---
builtin/rebase--helper.c | 13 -
git-rebase--interactive.sh | 11 +--
rebase-interactive.c | 31 +++
rebase-interactive.h | 1 +
4 files changed, 41 insertions(+), 15
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
---
cache.h | 1 +
editor.c | 27 +--
strbuf.h | 2 ++
3 files changed, 28 insertions(+), 2
use of
run_command_silent_on_success().
Signed-off-by: Alban Gruin
---
sequencer.c | 49 -
1 file changed, 24 insertions(+), 25 deletions(-)
diff --git a/sequencer.c b/sequencer.c
index 57fd58bc1..9e2b34a49 100644
--- a/sequencer.c
+++ b
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
---
builtin/rebase--helper.c | 7 ++-
git-rebase--interactive.sh | 25 -
sequencer.c
call to comment_for_reflog() is added at the
beginning of this function.
Signed-off-by: Alban Gruin
---
builtin/rebase--helper.c | 9 +++--
git-rebase--interactive.sh | 16 ++--
sequencer.c| 30 ++
sequencer.h| 3 +++
4
Hi,
I just published a blog post about last week:
https://blog.pa1ch.fr/posts/2018/07/02/en/gsoc2018-week-9.html
Cheers,
Alban
Hi Junio,
Le 03/07/2018 à 22:20, Junio C Hamano a écrit :
> Alban Gruin writes:
>
>> -enum check_level {
>> -CHECK_IGNORE = 0, CHECK_WARN, CHECK_ERROR
>> -};
>> -
>> -static enum check_level get_missing_commit_check_level(void)
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
---
cache.h | 1 +
editor.c | 27 +--
strbuf.h | 2 ++
3 files changed, 28 insertions(+), 2
$squash_onto to the state directory, it’s done by the
handler of `--make-script` instead.
Finally, this drops the $revision argument passed to `--make-script` in
git-rebase--interactive.sh, and rebase--helper is changed accordingly.
Signed-off-by: Alban Gruin
---
builtin/rebase--helper.c | 56
, append_todo_help() is removed from git-rebase--interactive.sh
to use `rebase--helper --append-todo-help` instead.
Signed-off-by: Alban Gruin
---
Unchanged from what have been queued on `pu` (ag/rebase-i-in-c), and
from v2.
Makefile | 1 +
builtin/rebase--helper.c | 11 --
git
Instead of skip_unnecessary_picks() printing its result to stdout, it
returns it into a const char *, 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
---
builtin/rebase--helper.c | 11
use of
run_command_silent_on_success().
Signed-off-by: Alban Gruin
---
sequencer.c | 51 +--
1 file changed, 25 insertions(+), 26 deletions(-)
diff --git a/sequencer.c b/sequencer.c
index 57fd58bc1..1b5d50298 100644
--- a/sequencer.c
+++ b
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
---
Unchanged from
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
---
builtin/rebase--helper.c | 7 ++-
git-rebase--interactive.sh | 25 -
sequencer.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
().
- Dropping the `verbose` parameter in run_git_checkout(),
prepare_branch_to_be_rebased(), and checkout_onto(), as the
replay_opts structure already has a `verbose` field.
- Rewriting complete_action() and init_revisions_and_shortrevisions().
Alban Gruin (13):
sequencer: make two functions and an
rebase-interactive.c.
skip_unnecessary_picks() and checkout_onto() becomes static, as they are
only used inside of the sequencer.
Signed-off-by: Alban Gruin
---
builtin/rebase--helper.c | 32 +++-
git-rebase--interactive.sh | 50 --
rebase
describing this behaviour
in git-rebase.sh is updated to reflect this change.
Signed-off-by: Alban Gruin
---
builtin/rebase--helper.c | 13 +-
git-rebase--interactive.sh | 53 ++-
git-rebase.sh | 2 +-
sequencer.c
function,
append_todo_help_to_file(). This function will go away after the
rewrite of complete_action().
Signed-off-by: Alban Gruin
---
builtin/rebase--helper.c | 2 +-
rebase-interactive.c | 45
rebase-interactive.h | 7 ++-
3 files changed
call to comment_for_reflog() is added at the
beginning of this function.
Signed-off-by: Alban Gruin
---
builtin/rebase--helper.c | 10 --
git-rebase--interactive.sh | 16 ++--
sequencer.c| 30 ++
sequencer.h| 2 ++
4
favour of a call to the helper.
Signed-off-by: Alban Gruin
---
Unchanged from v2.
builtin/rebase--helper.c | 13 -
git-rebase--interactive.sh | 11 +--
rebase-interactive.c | 31 +++
rebase-interactive.h | 1 +
4 files changed, 41
Le 10/07/2018 à 14:15, Alban Gruin a écrit :
> This rewrites append_todo_help() from shell to C. It also incorporates
> some parts of initiate_action() and complete_action() that also write
> help texts to the todo file.
>
> This also introduces the source file rebase-interacti
Le 10/07/2018 à 14:15, Alban Gruin a écrit :
> As part of the rewrite of interactive rebase, the sequencer will need to
> open the sequence editor to allow the user to edit the todo list.
> Instead of duplicating the existing launch_editor() function, this
> refactors it to a
Hi,
I published a new blog post:
https://blog.pa1ch.fr/posts/2018/07/10/en/gsoc2018-week-10.html
Cheers,
Alban
Hi Junio,
Le 11/07/2018 à 00:33, Junio C Hamano a écrit :
> Alban Gruin writes:
>> -complete_action
>> +exec git rebase--helper --complete-action "$shortrevisions"
>> "$onto_name" \
>> +"$shortonto" "$orig_he
Hi,
I published a new blog post about last week:
https://blog.pa1ch.fr/posts/2018/07/17/en/gsoc2018-week11.html
Cheers,
Alban
Hi Phillip,
I’ve just reread this message and have a couple of additionnal comments.
Le 01/02/2019 à 12:03, Phillip Wood a écrit :
> Hi Alban
>
> This looks good apart from some missing error handling.
>
> On 29/01/2019 15:01, Alban Gruin wrote:
>> edit_todo_list() is
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 v6.
sequencer.c | 7 ++-
1 file changed
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 v6.
sequencer.c | 69 ++---
sequencer.h | 50
id' to `base_oid'.
- [14/16] Better error handling in edit_todo_list() and
edit_todo_file().
- [16/16] Move sequencer_add_exec_commands() and
rearrange_squash_in_todo_file() to rebase--interactive.c.
The tip of this series is tagged as "refactor-todo-list-v7" in
https:/
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 | 109 +-
sequencer.h | 5 +-
3 files changed, 82
.
Signed-off-by: Alban Gruin
---
No changes since v6.
sequencer.c | 61 +++--
sequencer.h | 11 ++
2 files changed, 48 insertions(+), 24 deletions(-)
diff --git a/sequencer.c b/sequencer.c
index 346706029c..4809b22ce4 100644
--- a
-interactive.c, and made static again.
Signed-off-by: Alban Gruin
---
No changes since v6.
builtin/rebase--interactive.c | 2 +-
rebase-interactive.c | 91 -
rebase-interactive.h | 2 +
sequencer.c | 121
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 v6.
builtin/rebase--interactive.c | 2 +-
rebase-interactive.c
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
---
No changes since v6.
builtin/rebase--interactive.c | 13 ++-
sequencer.c
list, eliminating the need to reparse 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 | 82 +
1 file changed, 19
ing the todo list buffer.
Signed-off-by: Alban Gruin
---
No changes since v6.
sequencer.c | 67 ++---
sequencer.h | 6 +++--
2 files changed, 42 insertions(+), 31 deletions(-)
diff --git a/sequencer.c b/sequencer.c
index 25cc7a9a91..c844a9b7f3 10
().
complete_action() still uses rearrange_squash_in_todo_file() for now.
This will be changed in a future commit.
Signed-off-by: Alban Gruin
---
No changes since v6.
builtin/rebase--interactive.c | 2 +-
sequencer.c | 92 ++-
sequencer.h
list is edited in the middle of a rebase session).
Signed-off-by: Alban Gruin
---
builtin/rebase--interactive.c | 24 +-
rebase-interactive.c | 48 +--
rebase-interactive.h | 4 ++-
sequencer.c | 3 +--
sequencer.h
"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 the buffer.
Signed-off-by: Alban Gruin
---
rearrange_squash_in_todo_file() is slightly improved.
Signed-off-by: Alban Gruin
---
builtin/rebase--interactive.c | 81 +--
sequencer.c | 79 ++
sequencer.h | 7 ++-
3 files changed, 84 insertions(+), 83 deletions
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
---
No
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
---
No changes since v6.
sequencer.c | 21 +++--
1 file changed, 7 insertions(+), 14 deletions(-)
diff --git a/sequencer.c b/sequencer.c
todo list, shortrevisions and shortonto
are not NULL. Therefore, if shortrevisions or shortonto is NULL, then
edit_todo would be true, otherwise it would be false. Thus, edit_todo
is removed from the parameters of append_todo_help().
Signed-off-by: Alban Gruin
---
No changes since v6.
rebase-int
Hi Phillip,
Le 12/02/2019 à 11:52, Phillip Wood a écrit :
> Hi Alban
>
> I think this is almost there, I've got a couple of small comments below.
>
> On 10/02/2019 13:26, Alban Gruin wrote:
>> -%<-
>> diff --git a/builtin/rebase--interactive.c b/builtin/rebase
Hi Junio,
Le 24/02/2019 à 19:18, Junio C Hamano a écrit :
> * ag/sequencer-reduce-rewriting-todo (2019-01-29) 16 commits
> - rebase--interactive: move transform_todo_file() to rebase--interactive.c
> - sequencer: use edit_todo_list() in complete_action()
> - rebase-interactive: rewrite edit_tod
name_rev(), so we don’t name its
parents.
The code dealing with stdin after calling for_each_ref() is no longer
needed as we already read it. name_rev_line() is renamed name_rev_buf()
to reflect its new role better.
Signed-off-by: Alban Gruin
---
builtin/name-rev.c | 91
current commit and its first parent has not used the name, and that
it can be released. However, if the current commit has been named but
not its parent, or the reverse, the name will not be released.
Signed-off-by: Alban Gruin
---
builtin/name-rev.c | 23 ++-
1 file changed
To avoid naming some commits, name_rev() will need to check if a commit
is part of a commit list.
Signed-off-by: Alban Gruin
---
commit.c | 12
commit.h | 1 +
2 files changed, 13 insertions(+)
diff --git a/commit.c b/commit.c
index a5333c7ac6..fcb3e9245f 100644
--- a/commit.c
freed. If
it is not, the commit is left unnamed. In this case, the name can still
be used by the first descendant of this commit (or one of its descendants).
Signed-off-by: Alban Gruin
---
builtin/name-rev.c | 18 --
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a
fc-v1" in
https://github.com/agrn/git.
Alban Gruin (4):
name-rev: improve name_rev() memory usage
commit-list: add a function to check if a commit is in a list
name-rev: check if a commit should be named before naming it
name-rev: avoid naming from a ref if it’s not a descendant of any
c
Hi Eric,
Le 01/03/2019 à 19:05, Eric Sunshine a écrit :
> On Fri, Mar 1, 2019 at 12:50 PM Alban Gruin wrote:
> -%<-
> Minor: It would probably be more efficient to check if the count is 0
> first, and only search the list if not.
>
> By the way, how big is 'commit
Hi Jeff,
Le 01/03/2019 à 19:42, Jeff King a écrit :
> On Fri, Mar 01, 2019 at 06:50:20PM +0100, Alban Gruin wrote:
>
>> rafasc reported on IRC that on a repository with a lot of branches,
>> tags, remotes, and commits, name-rev --stdin could use a massive amount
>> of
Hi Christian,
Le 03/03/2019 à 20:33, Christian Couder a écrit :
> On Fri, Mar 1, 2019 at 7:11 PM Alban Gruin wrote:
>>
>> A ref may not be the descendant of all of the commits mentionned in
>> stdin. In this case, we want to avoid naming its parents.
>
> Properly
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 v7.
builtin/rebase--interactive.c | 2 +-
rebase-interactive.c
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 v7.
sequencer.c | 7 ++-
1 file changed
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 v7.
sequencer.c | 69 ++---
sequencer.h | 50
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
---
No changes since v7.
builtin/rebase--interactive.c | 13 ++-
sequencer.c
move several functions
to rebase--interactive.c") into three, one for each function.
The tip of this series is tagged as "refactor-todo-list-v8" in
https://github.com/agrn/git.
The range diff is included below.
Alban Gruin (18):
sequencer: changes in parse_insn_buffer()
sequence
ing the todo list buffer.
Signed-off-by: Alban Gruin
---
No changes since v7.
sequencer.c | 67 ++---
sequencer.h | 6 +++--
2 files changed, 42 insertions(+), 31 deletions(-)
diff --git a/sequencer.c b/sequencer.c
index 25cc7a9a91..c844a9b7f3 10
.
Signed-off-by: Alban Gruin
---
No changes since v7.
sequencer.c | 61 +++--
sequencer.h | 11 ++
2 files changed, 48 insertions(+), 24 deletions(-)
diff --git a/sequencer.c b/sequencer.c
index 346706029c..4809b22ce4 100644
--- a
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 | 18 --
sequencer.c | 114 ++
sequencer.h | 5 +-
3 files changed, 91
-interactive.c, and made static again.
Signed-off-by: Alban Gruin
---
No changes since v7.
builtin/rebase--interactive.c | 2 +-
rebase-interactive.c | 91 -
rebase-interactive.h | 2 +
sequencer.c | 121
().
complete_action() still uses rearrange_squash_in_todo_file() for now.
This will be changed in a future commit.
Signed-off-by: Alban Gruin
---
No changes since v7.
builtin/rebase--interactive.c | 2 +-
sequencer.c | 92 ++-
sequencer.h
list, eliminating the need to reparse 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
---
No changes since v7.
sequencer.c | 82 +
1
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
---
No changes since v7.
sequencer.c | 21 +++--
1 file changed, 7 insertions(+), 14 deletions(-)
diff --git a/sequencer.c b/sequencer.c
201 - 300 of 471 matches
Mail list logo