Hi Junio,
Le 08/10/2019 à 04:45, Junio C Hamano a écrit :
> Alban Gruin writes:
>
>> This can be seen as a continuation of ag/reduce-rewriting-todo.
>>
>> Currently, complete_action() releases its todo list before calling
>> sequencer_continue(), which reloads the
Hi Johannes,
Le 04/10/2019 à 17:09, Johannes Schindelin via GitGitGadget a écrit :
> From: Johannes Schindelin
>
> MSVC would complain thusly:
>
> C4200: nonstandard extension used: zero-sized array in struct/union
>
> Let's just use the `FLEX_ARRAY` constant that we introduced for exactly
Hi Birger,
Le 07/10/2019 à 12:43, Birger Skogeng Pedersen a écrit :
> It seems this topic has kindof derailed(?). But I feel like voicing my
> opinion nonetheless.
>
> -%<-
>
> My biggest gripe with not using Github is how to keep track of replies
> (comments) to a topic. I have to navigate thro
hange that.
Signed-off-by: Alban Gruin
---
Reworded commit.
builtin/rebase.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/builtin/rebase.c b/builtin/rebase.c
index e8319d5946..2097d41edc 100644
--- a/builtin/rebase.c
+++ b/builtin/rebase.c
@@ -117,6 +117,11 @@ static struct replay_opts get_r
written() -- this is unnecessary as we're starting
a new rebase.
This changes complete_action() to directly call pick_commits() to avoid
these unnecessary steps.
Signed-off-by: Alban Gruin
---
Reworded commit.
sequencer.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
d
1] http://public-inbox.org/git/1732521.CJWHkCQAay@andromeda/
Alban Gruin (5):
sequencer: update `total_nr' when adding an item to a todo list
sequencer: update `done_nr' when skipping commands in a todo list
sequencer: move the code writing total_nr on the disk to a new
ut it would start to matter at the end of this
series the same reason.
Signed-off-by: Alban Gruin
---
Reworded commit.
sequencer.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sequencer.c b/sequencer.c
index 575b852a5a..42313f8de6 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -5054,6 +5
to
matter.
Signed-off-by: Alban Gruin
---
Reworded commit.
sequencer.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sequencer.c b/sequencer.c
index d648aaf416..575b852a5a 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -2070,6 +2070,7 @@ void todo_list_release(struct todo_list *todo_list)
sta
function so it can be
called from 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 42313f8de6..ec7ea8d9e5 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -2342,6 +2342,16
Hi Junio,
Le 02/10/2019 à 04:38, Junio C Hamano a écrit :
> Alban Gruin writes:
>
>> Currently, complete_action() calls sequencer_continue() to do the
>> rebase. Even though the former already has the todo list, the latter
>> loads it from the disk and parses it. Calli
Hi Johannes,
Le 02/10/2019 à 10:20, Johannes Schindelin a écrit :
> Hi,
>
> On Fri, 27 Sep 2019, Phillip Wood wrote:
>
>> Hi Alban
>>
>> Thanks for removing some more unnecessary work reloading the the todo list.
>>
>> On 25/09/2019 21:13, Alban G
Hi Junio and Johannes,
Le 02/10/2019 à 10:59, Junio C Hamano a écrit :
> Johannes Schindelin writes:
>
>> Hi Junio,
>>
>> On Wed, 2 Oct 2019, Junio C Hamano wrote:
>>
>>> Alban Gruin writes:
>>>
>>>> `total_nr' is the total a
4c86140027, "Third batch").
The tip of this series is tagged as "reduce-todo-list-cont-v1" at
https://github.com/agrn/git.
[0] http://public-inbox.org/git/20190717143918.7406-1-alban.gr...@gmail.com/
[1] http://public-inbox.org/git/1732521.CJWHkCQAay@andromeda/
Alban
Currently, complete_action() calls sequencer_continue() to do the
rebase. Even though the former already has the todo list, the latter
loads it from the disk and parses it. Calling directly pick_commits()
from complete_action() avoids this unnecessary round trip.
Signed-off-by: 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.
This variable is mostly used by command prompts (ie. git-prompt.sh and
the like).
Signed-off-by: Alban Gruin
---
sequencer.
Signed-off-by: Alban Gruin
---
builtin/rebase.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/builtin/rebase.c b/builtin/rebase.c
index e8319d5946..2097d41edc 100644
--- a/builtin/rebase.c
+++ b/builtin/rebase.c
@@ -117,6 +117,11 @@ static struct replay_opts get_replay_op
function so it can be
called from 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 42313f8de6..ec7ea8d9e5 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -2342,6 +2342,16
In a todo list, `done_nr' is the amount of commands that were executed
or skipped, but skip_unnecessary_picks() did not update it.
This variable is mostly used by command prompts (ie. git-prompt.sh and
the like).
Signed-off-by: Alban Gruin
---
sequencer.c | 1 +
1 file changed, 1 inse
Hi,
This has been a long time since I have not given an update on this --
sorry about that. I think it’s time to do it.
Le 29/07/2019 à 11:38, Phillip Wood a écrit :
> Hi Alban
>
> -%<-
>
> That's an interesting point about `--continue`. Perhaps if `--edit-todo`
> detects deleted lines in erro
Hi Stephen,
Le 17/08/2019 à 00:56, 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 node is being modified without
> applying the patch or openi
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
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
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
&
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
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.
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
(), 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
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
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
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
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
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
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
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
`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
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
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
Hi Phillip,
It’s nice to see your work on this on the list.
Le 19/03/2019 à 20:03, Phillip Wood a écrit :
> From: Phillip Wood
>
> In order to run `rebase -i` without forking `rebase--interactive` it
> will be convenient to use the same structure when parsing the options in
> cmd_rebase() and c
list is edited in the middle of a rebase session).
Signed-off-by: Alban Gruin
---
builtin/rebase--interactive.c | 24 +++-
rebase-interactive.c | 53 +++
rebase-interactive.h | 4 ++-
sequencer.c | 3 +-
sequencer.h
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 v7.
rebase-int
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 v7.
sequencer.c | 21 +++--
1 file changed, 7 insertions(+), 14 deletions(-)
diff --git a/sequencer.c b/sequencer.c
As sequencer_add_exec_commands() is only needed inside of
rebase--interactive.c for `rebase -p', it is moved there from
sequencer.c.
The parameter r (repository) is dropped along the way.
Signed-off-by: Alban Gruin
---
New commit, but was a part of "rebase--interactive: move several
As transform_todo_file() is only needed inside of
rebase--interactive.c for `rebase -p', it is moved there from
sequencer.c.
The parameter r (repository) is dropped along the way.
Signed-off-by: Alban Gruin
---
New commit, but was a part of "rebase--interactive: move several
functions
As rearrange_squash_in_todo_file() is only needed inside of
rebase--interactive.c for `rebase -p', it is moved there from
sequencer.c.
The parameter r (repository) is dropped along the way, and the error
handling is slightly improved.
Signed-off-by: Alban Gruin
---
New commit, but was a pa
"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
---
No 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
---
No changes since v7.
sequencer.c | 82 +
1
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
.
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
-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
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
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
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
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 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
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
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
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
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
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
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
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
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
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
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:/
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
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
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
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
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
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
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
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
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
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"));
>>
>>
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
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
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
.
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
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
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
1 - 100 of 471 matches
Mail list logo