Re: What's cooking in git.git (Dec 2018, #01; Sun, 9)

2018-12-16 Thread Alban Gruin
Hi Junio, Le 09/12/2018 à 09:42, Junio C Hamano a écrit :> -%<- > * ag/sequencer-reduce-rewriting-todo (2018-11-12) 16 commits > . rebase--interactive: move transform_todo_file() to rebase--interactive.c > . sequencer: fix a call to error() in transform_todo_file() > . sequencer: use edit_todo_

ag/sequencer-reduce-rewriting-todo, was Re: What's cooking in git.git (Dec 2018, #02; Fri, 28)

2018-12-28 Thread Alban Gruin
Hi Junio, Le 28/12/2018 à 19:04, Junio C Hamano a écrit : > * ag/sequencer-reduce-rewriting-todo (2018-11-12) 16 commits > . rebase--interactive: move transform_todo_file() to rebase--interactive.c > . sequencer: fix a call to error() in transform_todo_file() > . sequencer: use edit_todo_list()

Re: [PATCH v3 06/16] sequencer: refactor sequencer_add_exec_commands() to work on a todo_list

2018-12-28 Thread Alban Gruin
Hi Phillip and Johannes, many thanks for your suggestions and feedback, I really appreciate it. Le 10/12/2018 à 15:33, Phillip Wood a écrit : > On 30/11/2018 19:06, Johannes Schindelin wrote: >> Hi, >> >> On Fri, 30 Nov 2018, Phillip Wood wrote: >> diff --git a/sequencer.c b/sequencer.c

[PATCH v4 01/16] sequencer: changes in parse_insn_buffer()

2018-12-29 Thread Alban Gruin
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 --- The full diff changed due to the conflict resolution with nd

[PATCH v4 00/16] sequencer: refactor functions working on a todo_list

2018-12-29 Thread Alban Gruin
tor sequencer_add_exec_commands() to work on a todo_list". - transform_todo_file(), sequencer_add_exec_commands() and rearrange_squash_in_todo_file() now print an error if they fail to write to the todo file. - A lot of changes were introduced by the conflict resolution with nd/the-index. Alban Gruin (

[PATCH v4 06/16] sequencer: refactor check_todo_list() to work on a todo_list

2018-12-29 Thread Alban Gruin
-interactive.c, and made static again. Signed-off-by: Alban Gruin --- builtin/rebase--interactive.c | 2 +- rebase-interactive.c | 91 - rebase-interactive.h | 1 + sequencer.c | 121 +++--- sequencer.h

[PATCH v4 02/16] sequencer: make the todo_list structure public

2018-12-29 Thread Alban Gruin
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 --- Some changes were introduced because of the conflict resolution with nd/the-index. They mostly consist of adding a

[PATCH v4 07/16] sequencer: refactor sequencer_add_exec_commands() to work on a todo_list

2018-12-29 Thread Alban Gruin
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 | 110 +- sequencer.h | 5 +- 3 files changed, 82

[PATCH v4 15/16] sequencer: use edit_todo_list() in complete_action()

2018-12-29 Thread 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 --- Changes due to conflicts with nd/the-index. sequencer.c | 21 +++-- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a

[PATCH v4 03/16] sequencer: remove the 'arg' field from todo_item

2018-12-29 Thread Alban Gruin
field does not store the address of the parameter, but the position of the first character of the parameter in the buffer. This will prevent todo_list_add_exec_commands() from having to do awful pointer arithmetics when growing the todo list buffer. Signed-off-by: Alban Gruin ---

[PATCH v4 04/16] sequencer: refactor transform_todos() to work on a todo_list

2018-12-29 Thread Alban Gruin
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

[PATCH v4 12/16] rebase-interactive: use todo_list_write_to_file() in edit_todo_list()

2018-12-29 Thread Alban Gruin
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

[PATCH v4 05/16] sequencer: introduce todo_list_write_to_file()

2018-12-29 Thread Alban Gruin
. Signed-off-by: Alban Gruin --- sequencer.c | 61 +++-- sequencer.h | 11 ++ 2 files changed, 48 insertions(+), 24 deletions(-) diff --git a/sequencer.c b/sequencer.c index 6b4eb7a9ba..b932ca34f2 100644 --- a/sequencer.c +++ b/sequencer.c

[PATCH v4 10/16] sequencer: change complete_action() to use the refactored functions

2018-12-29 Thread Alban Gruin
"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 ---

[PATCH v4 13/16] rebase-interactive: append_todo_help() changes

2018-12-29 Thread Alban Gruin
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 --- Slight rewording of the message a

[PATCH v4 16/16] rebase--interactive: move transform_todo_file() to rebase--interactive.c

2018-12-29 Thread 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 | 26 +- sequencer.c | 23 --- sequencer.h

[PATCH v4 14/16] rebase-interactive: rewrite edit_todo_list() to handle the initial edit

2018-12-29 Thread Alban Gruin
list is edited in the middle of a rebase session). Signed-off-by: Alban Gruin --- Changes due to conflicts with nd/the-index. builtin/rebase--interactive.c | 24 +- rebase-interactive.c | 48 ++- rebase-interactive.h | 4

[PATCH v4 09/16] sequencer: make sequencer_make_script() write its script to a strbuf

2018-12-29 Thread Alban Gruin
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 --- Changes due to conflicts with nd/the-index. builtin/rebase--interactive.c | 13

[PATCH v4 11/16] sequencer: refactor skip_unnecessary_picks() to work on a todo_list

2018-12-29 Thread Alban Gruin
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 | 78 - 1 file changed, 17

[PATCH v4 08/16] sequencer: refactor rearrange_squash() to work on a todo_list

2018-12-29 Thread 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 --- Slight rewording of the commit message and changes due to conflicts with nd/the-index. builtin/rebase--interactive.c | 2 +- sequencer.c

ag/sequencer-reduce-rewriting-todo Re: What's cooking in git.git (Jan 2019, #01; Mon, 7)

2019-01-08 Thread Alban Gruin
Hi Junio, Le 08/01/2019 à 00:34, Junio C Hamano a écrit : > * ag/sequencer-reduce-rewriting-todo (2018-11-12) 16 commits > . rebase--interactive: move transform_todo_file() to rebase--interactive.c > . sequencer: fix a call to error() in transform_todo_file() > . sequencer: use edit_todo_list()

Re: [PATCH] userdiff: Add a builtin pattern for dts files

2019-01-13 Thread Alban Gruin
Hi Stephen, thank you for your patch. I left a few comments below. Le 11/01/2019 à 22:51, Stephen Boyd a écrit : > The Linux kernel receives many patches to the devicetree files each > release. The hunk header for those patches typically show nothing, > making it difficult to figure out what nod

Re: Students projects: looking for small and medium project ideas

2019-01-15 Thread Alban Gruin
Hi Matthieu, Le 14/01/2019 à 18:53, Matthieu Moy a écrit : > Hi, > > I haven't been active for a while on this list, but for those who don't > know me, I'm a CS teacher and I'm regularly offering my students to > contribute to open-source projects as part of their school projects. A > few nice fe

Re: [PATCH] userdiff: Add a builtin pattern for dts files

2019-01-17 Thread Alban Gruin
Hi Junio, Le 14/01/2019 à 19:34, Junio C Hamano a écrit : > Alban Gruin writes: > >> thank you for your patch. I left a few comments below. >> >> Le 11/01/2019 à 22:51, Stephen Boyd a écrit: >>> The Linux kernel receives many patches to the devicetree files

Re: [PATCH] userdiff: Add a builtin pattern for dts files

2019-01-17 Thread Alban Gruin
Hi, sorry for the late answer. Le 14/01/2019 à 19:34, Stephen Boyd a écrit : > Quoting Alban Gruin (2019-01-13 13:26:21) >> Hi Stephen, >> >> thank you for your patch. I left a few comments below. >> >> Le 11/01/2019 à 22:51, Stephen Boyd a écrit : >>

[PATCH v5 04/16] sequencer: refactor transform_todos() to work on a todo_list

2019-01-23 Thread Alban Gruin
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

[PATCH v5 05/16] sequencer: introduce todo_list_write_to_file()

2019-01-23 Thread Alban Gruin
. Signed-off-by: Alban Gruin --- sequencer.c | 61 +++-- sequencer.h | 11 ++ 2 files changed, 48 insertions(+), 24 deletions(-) diff --git a/sequencer.c b/sequencer.c index 7a295cbd3f..87b43994ff 100644 --- a/sequencer.c +++ b/sequencer.c

[PATCH v5 07/16] sequencer: refactor sequencer_add_exec_commands() to work on a todo_list

2019-01-23 Thread Alban Gruin
still uses sequencer_add_exec_commands() for now. This will be changed in a future commit. Signed-off-by: Alban Gruin --- Unchanged since v4. builtin/rebase--interactive.c | 15 +++-- sequencer.c | 110 +- sequencer.h | 5 +

[PATCH v5 12/16] rebase-interactive: use todo_list_write_to_file() in edit_todo_list()

2019-01-23 Thread Alban Gruin
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

[PATCH v5 13/16] rebase-interactive: append_todo_help() changes

2019-01-23 Thread Alban Gruin
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 --- rebase-interact

[PATCH v5 01/16] sequencer: changes in parse_insn_buffer()

2019-01-23 Thread Alban Gruin
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 --- Unchanged since v4. sequencer.c | 7 ++- 1 file changed

[PATCH v5 08/16] sequencer: refactor rearrange_squash() to work on a todo_list

2019-01-23 Thread 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 --- Unchanged since v4. builtin/rebase--interactive.c | 2 +- sequencer.c | 92 ++- sequencer.h

[PATCH v5 06/16] sequencer: refactor check_todo_list() to work on a todo_list

2019-01-23 Thread Alban Gruin
-interactive.c, and made static again. Signed-off-by: Alban Gruin --- Squashed from Ramsay Jones. builtin/rebase--interactive.c | 2 +- rebase-interactive.c | 91 - rebase-interactive.h | 2 + sequencer.c | 121

[PATCH v5 10/16] sequencer: change complete_action() to use the refactored functions

2019-01-23 Thread Alban Gruin
"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 --- Unc

[PATCH v5 15/16] sequencer: use edit_todo_list() in complete_action()

2019-01-23 Thread 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 --- Unchanged since v4. sequencer.c | 21 +++-- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/sequencer.c b/sequencer.c

[PATCH v5 09/16] sequencer: make sequencer_make_script() write its script to a strbuf

2019-01-23 Thread Alban Gruin
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 --- Unchanged since v4. builtin/rebase--interactive.c | 13 ++- sequencer.c

[PATCH v5 00/16] sequencer: refactor functions working on a todo_list

2019-01-23 Thread Alban Gruin
/the-index (36e7ed69de, "rebase-interactive.c: remove the_repository references"). Changes since v4: - Adding todo_item_get_arg() to return the address of the parameter of an item to avoid confusion. - Squashed and <5440ddf5-0b80-3d00-7daf-133a8611e...@ramsayjones.plus.com> fr

[PATCH v5 03/16] sequencer: remove the 'arg' field from todo_item

2019-01-23 Thread Alban Gruin
ing the todo list buffer. Signed-off-by: Alban Gruin --- Introduction and use of todo_item_get_arg(). sequencer.c | 67 ++--- sequencer.h | 6 +++-- 2 files changed, 42 insertions(+), 31 deletions(-) diff --git a/sequencer.c b/sequencer.c i

[PATCH v5 02/16] sequencer: make the todo_list structure public

2019-01-23 Thread Alban Gruin
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 --- Unchanged since v4. sequencer.c | 69 ++--- sequencer.h | 50

[PATCH v5 11/16] sequencer: refactor skip_unnecessary_picks() to work on a todo_list

2019-01-23 Thread Alban Gruin
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 --- Unchanged since v4. sequencer.c | 78 - 1

[PATCH v5 14/16] rebase-interactive: rewrite edit_todo_list() to handle the initial edit

2019-01-23 Thread Alban Gruin
list is edited in the middle of a rebase session). Signed-off-by: Alban Gruin --- Unchanged since v4. builtin/rebase--interactive.c | 24 +- rebase-interactive.c | 48 ++- rebase-interactive.h | 4 ++- sequencer.c

[PATCH v5 16/16] rebase--interactive: move transform_todo_file() to rebase--interactive.c

2019-01-23 Thread 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 --- Unchanged since v4. builtin/rebase--interactive.c | 26 +- sequencer.c | 23 --- sequencer.h

Re: [PATCH v5 00/16] sequencer: refactor functions working on a todo_list

2019-01-24 Thread Alban Gruin
[I’m resending this as I clicked on the wrong button…] Hi, Le 24/01/2019 à 22:54, Junio C Hamano a écrit : > Alban Gruin writes: > > Before I comment on anything else. > > > This is based on nd/the-index (36e7ed69de, "rebase-interactive.c: remove > > the_rep

Re: [PATCH v2] rebase: move state_dir to tmp prior to deletion

2019-01-26 Thread Alban Gruin
Hi Ben, Le 26/01/2019 à 11:16, Ben Woosley a écrit : > From: Ben Woosley > > To avoid partial deletion / zombie rebases. > > Example behavior under partial deletion, after > Ctrl-Cing out of a standard rebase: > > $ git rebase target > First, rewinding head to replay your work on top o

Re: [PATCH v2 4/4] built-in rebase: call `git am` directly

2019-01-26 Thread Alban Gruin
Hi Johannes, Le 18/01/2019 à 16:09, Johannes Schindelin via GitGitGadget a écrit : > -%<- > +static int run_am(struct rebase_options *opts) > +{ > -%<- > + > + if (!status) { > + return move_to_original_branch(opts); > + } > + > + if (is_directory(opts->state_dir)) > +

[PATCH v6 07/16] sequencer: refactor sequencer_add_exec_commands() to work on a todo_list

2019-01-29 Thread Alban Gruin
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 | 110 +- sequencer.h | 5 +- 3 files changed, 82

[PATCH v6 11/16] sequencer: refactor skip_unnecessary_picks() to work on a todo_list

2019-01-29 Thread Alban Gruin
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 | 78 - 1 file changed, 17

[PATCH v6 10/16] sequencer: change complete_action() to use the refactored functions

2019-01-29 Thread Alban Gruin
"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 ---

[PATCH v6 08/16] sequencer: refactor rearrange_squash() to work on a todo_list

2019-01-29 Thread 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 | 92 ++- sequencer.h | 2 +- 3

[PATCH v6 06/16] sequencer: refactor check_todo_list() to work on a todo_list

2019-01-29 Thread Alban Gruin
-interactive.c, and made static again. Signed-off-by: Alban Gruin --- builtin/rebase--interactive.c | 2 +- rebase-interactive.c | 91 - rebase-interactive.h | 2 + sequencer.c | 121 +++--- sequencer.h

[PATCH v6 00/16] sequencer: refactor functions working on a todo_list

2019-01-29 Thread Alban Gruin
/the-index (36e7ed69de, "rebase-interactive.c: remove the_repository references"). I am rerolling this because I accidentally added a newline to a place I shouldn’t in the patch 05/16 of the v5. There is no change in this version. Alban Gruin (16): sequencer: changes in parse_insn_buffer()

[PATCH v6 13/16] rebase-interactive: append_todo_help() changes

2019-01-29 Thread Alban Gruin
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 --- rebase-interact

[PATCH v6 02/16] sequencer: make the todo_list structure public

2019-01-29 Thread Alban Gruin
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 | 69 ++--- sequencer.h | 50

[PATCH v6 04/16] sequencer: refactor transform_todos() to work on a todo_list

2019-01-29 Thread Alban Gruin
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

[PATCH v6 03/16] sequencer: remove the 'arg' field from todo_item

2019-01-29 Thread Alban Gruin
ing the todo list buffer. Signed-off-by: Alban Gruin --- sequencer.c | 67 ++--- sequencer.h | 6 +++-- 2 files changed, 42 insertions(+), 31 deletions(-) diff --git a/sequencer.c b/sequencer.c index 5b84a20532..0e7ab16a05 100644 --- a/sequencer

[PATCH v6 01/16] sequencer: changes in parse_insn_buffer()

2019-01-29 Thread Alban Gruin
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

[PATCH v6 09/16] sequencer: make sequencer_make_script() write its script to a strbuf

2019-01-29 Thread Alban Gruin
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 | 41

[PATCH v6 16/16] rebase--interactive: move transform_todo_file() to rebase--interactive.c

2019-01-29 Thread 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 | 26 +- sequencer.c | 23 --- sequencer.h

[PATCH v6 14/16] rebase-interactive: rewrite edit_todo_list() to handle the initial edit

2019-01-29 Thread Alban Gruin
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

[PATCH v6 05/16] sequencer: introduce todo_list_write_to_file()

2019-01-29 Thread Alban Gruin
. Signed-off-by: Alban Gruin --- sequencer.c | 61 +++-- sequencer.h | 11 ++ 2 files changed, 48 insertions(+), 24 deletions(-) diff --git a/sequencer.c b/sequencer.c index 7a295cbd3f..87b43994ff 100644 --- a/sequencer.c +++ b/sequencer.c

[PATCH v6 12/16] rebase-interactive: use todo_list_write_to_file() in edit_todo_list()

2019-01-29 Thread Alban Gruin
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

[PATCH v6 15/16] sequencer: use edit_todo_list() in complete_action()

2019-01-29 Thread 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 | 21 +++-- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/sequencer.c b/sequencer.c index 8f47f0cf39

Re: [PATCH v6 10/16] sequencer: change complete_action() to use the refactored functions

2019-01-29 Thread Alban Gruin
Hi Junio, Le 29/01/2019 à 21:14, Junio C Hamano a écrit : > Alban Gruin writes: > >> if (opts->allow_ff && skip_unnecessary_picks(r, &oid)) >> return error(_("could not skip unnecessary pick commands")); >> >>

Re: Broken interactive rebase text after some UTF-8 characters

2019-01-31 Thread Alban Gruin
Hi Phillip and Michal, I think I found the bug. If you look at .git/rebase-merge/git-rebase-todo.backup, which is created before the editor is opened, you can see that it does not have this problem. In between, transform_todos() is called and causes the problem reported by Michal. This seems to

Re: [PATCH v6 07/16] sequencer: refactor sequencer_add_exec_commands() to work on a todo_list

2019-01-31 Thread Alban Gruin
Hi Phillip, Le 31/01/2019 à 15:30, Phillip Wood a écrit : > Hi Alban > > On 29/01/2019 15:01, Alban Gruin wrote: >> This refactors sequencer_add_exec_commands() to work on a todo_list to >> avoid redundant reads and writes to the disk. >> >> Instead of insertin

Re: Broken interactive rebase text after some UTF-8 characters

2019-01-31 Thread Alban Gruin
Hi Phillip, Le 31/01/2019 à 21:40, Phillip Wood a écrit : > Hi Alban > > On 31/01/2019 17:43, Alban Gruin wrote: >> Hi Phillip and Michal, >> >> I think I found the bug. > > Good find! Which os are you on? I’m on Linux, but I found this on OpenIndiana running under QEMU. -- Alban

Re: Broken interactive rebase text after some UTF-8 characters

2019-02-01 Thread Alban Gruin
Hi Johannes, Le 01/02/2019 à 08:38, Johannes Schindelin a écrit : > Hi, > > On Thu, 31 Jan 2019, Junio C Hamano wrote: > >> Phillip Wood writes: >> Are we misusing C formats? >>> >>> The C standard and POSIX both say that the * refers to the maximum >>> number of bytes to print but it look

Re: Broken interactive rebase text after some UTF-8 characters

2019-02-01 Thread Alban Gruin
Hi Michal, Le 01/02/2019 à 10:06, Michal Nowak a écrit : > Johannes, > > On Friday, February 1, 2019 at 8:38 AM, Johannes Schindelin > wrote: >> Hi, >> >> On Thu, 31 Jan 2019, Junio C Hamano wrote: >> >>> Phillip Wood writes: >>> > Are we misusing C formats? The C standard and PO

Re: [PATCH v6 14/16] rebase-interactive: rewrite edit_todo_list() to handle the initial edit

2019-02-02 Thread Alban Gruin
Hi Phillip, Le 01/02/2019 à 12:03, Phillip Wood a écrit : >>   } >>   -    strbuf_reset(&todo_list.buf); >> -    if (launch_sequence_editor(todo_file, &todo_list.buf, NULL)) { >> -    todo_list_release(&todo_list); >> -    return -1; >> -    } >> +    if (launch_sequence_editor(todo_fi

Re: [PATCH v6 16/16] rebase--interactive: move transform_todo_file() to rebase--interactive.c

2019-02-02 Thread Alban Gruin
Hi Phillip, Le 01/02/2019 à 12:15, Phillip Wood a écrit : > Hi Alban > > On 29/01/2019 15:01, Alban Gruin wrote: >> As transform_todo_file() is only needed inside of rebase--interactive.c, >> it is moved there from sequencer.c. > > I think I'd prefer to minimize

Re: [PATCH v6 07/16] sequencer: refactor sequencer_add_exec_commands() to work on a todo_list

2019-02-02 Thread Alban Gruin
Le 01/02/2019 à 15:51, Phillip Wood a écrit : >>> @@ -4473,38 +4475,62 @@ int sequencer_add_exec_commands(struct >>> repository *r, >>>   * those chains if there are any. >>>   */ >>> insert = -1; >>> -    for (i = 0; i < todo_list.nr; i++) { >>> -    enum todo_command command = to

Re: [PATCH 2/2] mingw: enable DEP and ASLR

2019-05-01 Thread Alban Gruin
Hi Johannes, Le 01/05/2019 à 00:41, Johannes Schindelin a écrit : > Hi Hannes, > > On Tue, 30 Apr 2019, Johannes Sixt wrote: > >> [had to add Dscho as recipient manually, mind you] > > I usually pick up responses to GitGitGadget patch series even if I am not > on explicit Cc: (but it might take

Why is there still git-rebase--am.sh?

2019-06-02 Thread Alban Gruin
Hi, I was wandering in rebase’s source code, and found out that even though run_specific_rebase() no longer calls git-rebase--am.sh since 21853626ea ("built-in rebase: call `git am` directly", 2019-01-18), this commit did not remove the code to call it. I guess it was an oversight. Now that g

[RFC PATCH 0/9] rebase -i: extend rebase.missingCommitsCheck to `--edit-todo' and co.

2019-07-17 Thread Alban Gruin
er (9d418600f4, "The fifth batch"). The tip of this series is tagged as "edit-todo-drop-rfc" in https://github.com/agrn/git. Alban Gruin (9): t3404: demonstrate that --edit-todo does not check for dropped commits t3429: demonstrate that rebase exec does not check for dropp

[RFC PATCH 1/9] t3404: demonstrate that --edit-todo does not check for dropped commits

2019-07-17 Thread Alban Gruin
3404 to demonstrate this. The first one is not broken, as when `rebase.missingCommitsCheck' is not set, nothing in particular must be done towards dropped commits. The two others are broken, demonstrating the problem. Signed-off-by: Alban Gruin --- t/t3404-rebase-interactive.sh | 82

[RFC PATCH 2/9] t3429: demonstrate that rebase exec does not check for dropped commits

2019-07-17 Thread Alban Gruin
thing should be done for dropped commits. The last two are, demonstrating the problem. Signed-off-by: Alban Gruin --- t/t3429-rebase-edit-todo.sh | 44 +++-- 1 file changed, 42 insertions(+), 2 deletions(-) diff --git a/t/t3429-rebase-edit-todo.sh b/t/t3429-rebase

[RFC PATCH 3/9] sequencer: update `total_nr' when adding an item to a todo list

2019-07-17 Thread Alban Gruin
`total_nr' is the total amount of items, done and toto, that are in a todo list. But unlike `nr', it was not updated when an item was appended to the list. Signed-off-by: Alban Gruin --- sequencer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sequencer.c b/sequencer.c index

[RFC PATCH 4/9] sequencer: update `done_nr' when skipping commands in a todo list

2019-07-17 Thread Alban Gruin
In a todo list, `done_nr' is the amount of commands that were executed or skipped, but skip_unnecessary_picks() did not update it. Signed-off-by: Alban Gruin --- sequencer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sequencer.c b/sequencer.c index e61ae75451..ec9c3d4dc5 100644

[RFC PATCH 6/9] sequencer: add a parameter to sequencer_continue() to accept a todo list

2019-07-17 Thread Alban Gruin
sequencer_continue() to accept a todo list. If a valid list is provided, read_populate_todo() won't be called. complete_action() is modified to pass its todo list to sequencer_continue(). This also avoids reloading the todo list from the disk just after releasing it. Signed-off-by: Alban

[RFC PATCH 5/9] sequencer: move the code writing total_nr on the disk to a new function

2019-07-17 Thread Alban Gruin
can be called by complete_action(). Signed-off-by: Alban Gruin --- sequencer.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/sequencer.c b/sequencer.c index ec9c3d4dc5..d66b80d49f 100644 --- a/sequencer.c +++ b/sequencer.c @@ -2343,6 +2343,16 @@ void

[RFC PATCH 9/9] sequencer: have read_populate_todo() check for dropped commits

2019-07-17 Thread Alban Gruin
This adds the ability to check if commits were dropped when resuming a rebase (with `--continue') or when reloading the todo list after an `exec' command. Tests added previously should work now. Signed-off-by: Alban Gruin --- sequencer.c | 5 - t/t3

[RFC PATCH 7/9] rebase-interactive: todo_list_check() also uses the done list

2019-07-17 Thread Alban Gruin
(), to load the done list and the backup list, and call todo_list_check(). Signed-off-by: Alban Gruin --- rebase-interactive.c | 57 ++-- rebase-interactive.h | 6 - sequencer.c | 4 ++-- 3 files changed, 57 insertions(+), 10 deleti

[RFC PATCH 8/9] rebase-interactive: warn if commit is dropped with --edit-todo

2019-07-17 Thread Alban Gruin
This adds the ability for --edit-todo to check if commits were dropped by the user using todo_list_check_against_backup(). Signed-off-by: Alban Gruin --- rebase-interactive.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/rebase-interactive.c b/rebase

Re: [RFC PATCH 1/9] t3404: demonstrate that --edit-todo does not check for dropped commits

2019-07-19 Thread Alban Gruin
Hi Junio, Le 18/07/2019 à 20:31, Junio C Hamano a écrit : > Alban Gruin writes: > > When set to "warn" or "error", `rebase.missingCommitCheck' would make > > rebase -i warn if the user removed commits from the todo list to prevent > > mistakes.

Re: [RFC PATCH 3/9] sequencer: update `total_nr' when adding an item to a todo list

2019-07-19 Thread Alban Gruin
Hi, Le 18/07/2019 à 21:52, Junio C Hamano a écrit : > Alban Gruin writes: > > `total_nr' is the total amount of items, done and toto, that are in a > > "amount" -> "number" perhaps. Also s/toto/todo/ perhaps but I am > not sure what you wanted to s

Re: [RFC PATCH 4/9] sequencer: update `done_nr' when skipping commands in a todo list

2019-07-19 Thread Alban Gruin
Hi, Le 18/07/2019 à 21:55, Junio C Hamano a écrit : > Alban Gruin writes: > > In a todo list, `done_nr' is the amount of commands that were executed > > or skipped, but skip_unnecessary_picks() did not update it. > > OK. Together with 3/9 and this one, any increment

Re: [RFC PATCH 5/9] sequencer: move the code writing total_nr on the disk to a new function

2019-07-19 Thread Alban Gruin
Hi, Le 18/07/2019 à 22:04, Junio C Hamano a écrit : > Alban Gruin writes: > > The total amount of commands can be used to show the progression of the > > rebasing in a shell. This number is written to the disk by > > read_populate_todo() when the todo list is loaded from &

Re: [RFC PATCH 0/9] rebase -i: extend rebase.missingCommitsCheck to `--edit-todo' and co.

2019-07-25 Thread Alban Gruin
e early bug fix > patches are useful in their own right) > > On 17/07/2019 15:39, Alban Gruin wrote: >> To prevent mistakes when editing a branch, rebase features a knob, >> rebase.missingCommitsCheck, to warn the user if a commit was dropped. >> Unfortunately, this

Re: What's cooking in git.git (Oct 2018, #04; Fri, 19)

2018-10-20 Thread Alban Gruin
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

Re: [PATCH v2 3/3] rebase (autostash): use an explicit OID to apply the stash

2018-10-23 Thread Alban Gruin
Hi Johannes, this looks good to me, too! Cheers, Alban

[PATCH v2 01/16] sequencer: changes in parse_insn_buffer()

2018-10-27 Thread Alban Gruin
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

[PATCH v2 03/16] sequencer: refactor transform_todos() to work on a todo_list

2018-10-27 Thread Alban Gruin
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

[PATCH v2 00/16] sequencer: refactor functions working on a todo_list

2018-10-27 Thread Alban Gruin
plete_action() 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

[PATCH v2 02/16] sequencer: make the todo_list structure public

2018-10-27 Thread Alban Gruin
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

[PATCH v2 10/16] sequencer: refactor skip_unnecessary_picks() to work on a todo_list

2018-10-27 Thread Alban Gruin
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 a

[PATCH v2 05/16] sequencer: refactor check_todo_list() to work on a todo_list

2018-10-27 Thread Alban Gruin
-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

[PATCH v2 08/16] sequencer: make sequencer_make_script() write its script to a strbuf

2018-10-27 Thread Alban Gruin
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

[PATCH v2 12/16] rebase-interactive: append_todo_help() changes

2018-10-27 Thread Alban Gruin
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 --

[PATCH v2 11/16] rebase-interactive: use todo_list_write_to_file() in edit_todo_list()

2018-10-27 Thread Alban Gruin
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

[PATCH v2 13/16] rebase-interactive: rewrite edit_todo_list() to handle the initial edit

2018-10-27 Thread Alban Gruin
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

  1   2   3   4   5   >