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
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
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
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
Hi Junio,
Le 19/07/2018 à 00:03, Junio C Hamano a écrit :
> * ag/rebase-i-in-c (2018-07-10) 13 commits
> - rebase -i: rewrite the rest of init_revisions_and_shortrevisions in C
> - rebase -i: implement the logic to initialize the variable $revision in C
> - rebase--interactive: remove unused mo
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
---
No code changes since
, append_todo_help() is removed from git-rebase--interactive.sh
to use `rebase--helper --append-todo-help` instead.
Signed-off-by: Alban Gruin
---
No code changes since v3.
Makefile | 1 +
builtin/rebase--helper.c | 11 --
git-rebase--interactive.sh | 52
builtin
Alban Gruin (20):
sequencer: make two 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 to silence a command
favour of a call to the helper.
Signed-off-by: Alban Gruin
---
No code changes since v3.
builtin/rebase--helper.c | 13 -
git-rebase--interactive.sh | 11 +--
rebase-interactive.c | 31 +++
rebase-interactive.h | 1 +
4 files changed
Signed-off-by: Alban Gruin
---
New patch.
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 d392160ba9..7755b68092 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3404-rebase-inte
ite "noop", and will abort without starting the editor.
Signed-off-by: Alban Gruin
---
builtin/rebase--helper.c | 12 -
git-rebase--interactive.sh | 53 ++--
git-rebase.sh | 2 +-
sequencer.c| 99 ++
s
function,
append_todo_help_to_file(). This function will go away after the
rewrite of complete_action().
Signed-off-by: Alban Gruin
---
Dropped the `include` in rebase-interactive.h.
builtin/rebase--helper.c | 2 +-
rebase-interactive.c | 45
rebase
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
---
builtin/rebase--helper.c
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
---
builtin/rebase--helper.c | 23
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
---
.gitignore| 1 -
Makefile
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
---
All patches from this one are new.
builtin/rebase
changed accordingly.
Signed-off-by: Alban Gruin
---
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
index 6085527b2b
.
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 | 23 ++
git-rebase--interactive.sh | 50 --
rebase-interactive.c | 22
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
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 | 200 +
git
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 v3.
cache.h | 1 +
editor.c | 27 +--
strbuf.h | 2 ++
3 files changed, 28
use of
run_command_silent_on_success().
Signed-off-by: Alban Gruin
---
No changes since v3.
sequencer.c | 51 +--
1 file changed, 25 insertions(+), 26 deletions(-)
diff --git a/sequencer.c b/sequencer.c
index 0fc03dfe48..274cddd13f 100644
--- a
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 v3.
builtin/rebase--helper.c | 7 ++-
git-rebase--interactive.sh | 25
call to comment_for_reflog() is added at the
beginning of this function.
Signed-off-by: Alban Gruin
---
Dropped the `verbose` variable.
builtin/rebase--helper.c | 7 ++-
git-rebase--interactive.sh | 16 ++--
sequencer.c| 30
as it is useless now.
Signed-off-by: Alban Gruin
---
.gitignore | 1 -
Makefile | 1 -
builtin/rebase--helper.c | 226 -
builtin/rebase--interactive.c | 27 +++-
git-rebase--preserve-merges.sh | 10 +-
git.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
Hi,
I published a new blog post here:
https://blog.pa1ch.fr/posts/2018/07/24/en/gsoc2018-week12.html
Cheers,
Alban
Hi,
Le 30/07/2018 à 20:25, SZEDER Gábor a écrit :
>> diff --git a/sequencer.c b/sequencer.c
>> index 1c035ceec7..d257903db0 100644
>> --- a/sequencer.c
>> +++ b/sequencer.c
>
>> +int write_basic_state(struct replay_opts *opts, const char *head_name,
>> + const char *onto, const c
Hi Ramsay,
Le 30/07/2018 à 00:44, Ramsay Jones a écrit :
>
> Commit 94d4e2fb88 ("rebase -i: move rebase--helper modes to
> rebase--interactive", 2018-07-24) removed the definition of the
> 'cmd_rebase__helper' symbol, but forgot to remove the corresponding
> declaration in the 'builtin.h' header
ich
could lead to problems. This patch changes the rewritten version to
behave like the shell version.
Signed-off-by: Alban Gruin
---
Hi Junio, could you apply this patch on top of ag/rebase-i-in-c, please?
sequencer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sequencer
Hi Junio,
Le 31/07/2018 à 17:23, Junio C Hamano a écrit :
> Alban Gruin writes:
>
>> As pointed out by SZEDER Gábor, git-rebase.sh wrote to to 'quiet' with
>> an `echo`:
>>
>> echo "$GIT_QUIET" > "$state_dir/quiet"
>>
&
, append_todo_help() is removed from git-rebase--interactive.sh
to use `rebase--helper --append-todo-help` instead.
Signed-off-by: Alban Gruin
---
No changes since v4.
Makefile | 1 +
builtin/rebase--helper.c | 11 --
git-rebase--interactive.sh | 52
call to comment_for_reflog() is added at the
beginning of this function.
Signed-off-by: Alban Gruin
---
No changes since v4.
builtin/rebase--helper.c | 7 ++-
git-rebase--interactive.sh | 16 ++--
sequencer.c| 30 ++
sequencer.h
favour of a call to the helper.
Signed-off-by: Alban Gruin
---
No changes since v4.
builtin/rebase--helper.c | 13 -
git-rebase--interactive.sh | 11 +--
rebase-interactive.c | 31 +++
rebase-interactive.h | 1 +
4 files changed, 41
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 v4.
cache.h | 1 +
editor.c | 27 +--
strbuf.h | 2 ++
3 files changed, 28
use of
run_command_silent_on_success().
Signed-off-by: Alban Gruin
---
No changes since v4.
sequencer.c | 51 +--
1 file changed, 25 insertions(+), 26 deletions(-)
diff --git a/sequencer.c b/sequencer.c
index 8eff526584..6d87f5ae6a 100644
--- a
x27;,
'jk/empty-pick-fix', and 'as/sequencer-customizable-comment-char', as
they modified sequencer.c.
Changes since v4:
- [15/20] Add a newline char to $state_dir/quiet in write_basic_state(), even
if $GIT_QUIET is not set
- [20/20] Remove the declaration of
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
---
No changes since v4
.
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 v4.
builtin/rebase--helper.c | 23 ++
git-rebase--interactive.sh | 50 --
rebase-interactive.c
ite "noop", and will abort without starting the editor.
Signed-off-by: Alban Gruin
---
No changes since v4.
builtin/rebase--helper.c | 12 -
git-rebase--interactive.sh | 53 ++--
git-rebase.sh | 2 +-
sequencer.c| 99 +
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 v4.
builtin/rebase--helper.c | 2 +-
rebase-interactive.c | 45
rebase-interactive.h | 4
Signed-off-by: Alban Gruin
---
No changes since v4.
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
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 v4.
builtin/rebase--helper.c | 7 ++-
git-rebase--interactive.sh | 25
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 v4
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
---
builtin/rebase--helper.c | 28 +-
git-rebase
modified to call git-rebase--interactive2
instead of git-rebase--helper.
Signed-off-by: Alban Gruin
---
No changes since v4.
.gitignore | 1 +
Makefile | 1 +
builtin.h | 1 +
builtin/rebase--interactive2.c | 200
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 v4.
.gitignore| 1
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 v4
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 v4.
builtin/rebase
changed accordingly.
Signed-off-by: Alban Gruin
---
No changes since v4.
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
as it is useless now.
Signed-off-by: Alban Gruin
---
.gitignore | 1 -
Makefile | 1 -
builtin.h | 1 -
builtin/rebase--helper.c | 226 -
builtin/rebase--interactive.c | 27 +++-
git
Hi,
I am a bit late this week, but here is my blog post:
https://blog.pa1ch.fr/posts/2018/08/02/en/gsoc2018-week13.html
Cheers,
Alban
Hi Phillip,
Le 07/08/2018 à 15:57, Phillip Wood a écrit :
>> +if (ret < 0)
>> +error_errno(_("could not append help text to '%s'"),
>> rebase_path_todo());
>> +
>> +fclose(todo);
>
> You should definitely check the return value and return an error if
> appropriate as fputs()
Hi Phillip,
Le 07/08/2018 à 16:00, Phillip Wood a écrit :
> On 31/07/18 18:59, Alban Gruin wrote:
>> +
>> +int edit_todo_list(unsigned flags)
>> +{
>> +struct strbuf buf = STRBUF_INIT;
>> +const char *todo_file = rebase_path_todo();
>> +FILE *
Hi Phillip,
Le 08/08/2018 à 18:04, Phillip Wood a écrit :
+int edit_todo_list(unsigned flags)
+{
+ struct strbuf buf = STRBUF_INIT;
+ const char *todo_file = rebase_path_todo();
+ FILE *todo;
+
+ if (strbuf_read_file(&buf, todo_file, 0) < 0)
+
Le 09/08/2018 à 16:22, Phillip Wood a écrit :
>> +int complete_action(struct replay_opts *opts, unsigned flags,
>> + const char *shortrevisions, const char *onto_name,
>> + const char *onto, const char *orig_head, const char *cmd,
>> + unsigned autosquash)
>> +{
>
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 v5
, append_todo_help() is removed from git-rebase--interactive.sh
to use `rebase--helper --append-todo-help` instead.
Signed-off-by: Alban Gruin
---
No changes since v5.
Makefile | 1 +
builtin/rebase--helper.c | 11 --
git-rebase--interactive.sh | 52
use of
run_command_silent_on_success().
Signed-off-by: Alban Gruin
---
No changes since v5.
sequencer.c | 51 +--
1 file changed, 25 insertions(+), 26 deletions(-)
diff --git a/sequencer.c b/sequencer.c
index dd1b060863..eaa1aa7deb 100644
--- a
call to comment_for_reflog() is added at the
beginning of this function.
Signed-off-by: Alban Gruin
---
No changes since v5.
builtin/rebase--helper.c | 7 ++-
git-rebase--interactive.sh | 16 ++--
sequencer.c| 30 ++
sequencer.h
Signed-off-by: Alban Gruin
---
No changes since v5.
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
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 | 43
rebase-interactive.h | 4 +++-
3 files changed
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 v5.
cache.h | 1 +
editor.c | 27 +--
strbuf.h | 2 ++
3 files changed, 28
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 v5.
builtin/rebase--helper.c | 7 ++-
git-rebase--interactive.sh | 25
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
ete_action().
- [11/20] Use error() to show the message "Nothing to do".
- [11/20] Typofix.
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
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 | 27 +++
rebase-interactive.h | 1 +
4 files changed, 37 insertions(+), 15
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
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
as it is useless now.
Signed-off-by: Alban Gruin
---
No changes since v5.
.gitignore | 1 -
Makefile | 1 -
builtin.h | 1 -
builtin/rebase--helper.c | 226 -
builtin/rebase--interactive.c
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 v5.
.gitignore| 1
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 v5.
builtin/rebase
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 | 200 +
git
changed accordingly.
Signed-off-by: Alban Gruin
---
No changes since v5.
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
.
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 v5.
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
---
No changes since v5
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 v5.
builtin/rebase--helper.c | 28
Hi Junio,
Le 10/08/2018 à 21:25, Junio C Hamano a écrit :
> Alban Gruin writes:
>
>> This rewrites complete_action() from shell to C.
>>
>> A new mode is added to rebase--helper (`--complete-action`), as well as
>> a new flag (`--autosquash`).
>>
>> F
Le 10/08/2018 à 22:27, Junio C Hamano a écrit :
> If we are planning to make all the backend responsible for stashing
> away before they run and applying the stash after they are done,
> then it might make sense to have the application side on the backend
> as the first step. But if what you need
Hi Duy,
Le 13/08/2018 à 18:06, Duy Nguyen a écrit :
> On Fri, Aug 10, 2018 at 6:54 PM Alban Gruin wrote:
> > This patch series rewrite the interactive rebase from shell to C.
>
> I was running some tests on 'pu' and ran git-rebase--interactive
> without arguments bec
Hi Junio,
Le 21/08/2018 à 00:15, Junio C Hamano a écrit :
> * ag/rebase-i-in-c (2018-08-10) 20 commits
> - rebase -i: move rebase--helper modes to rebase--interactive
> - rebase -i: remove git-rebase--interactive.sh
> - rebase--interactive2: rewrite the submodes of interactive rebase in C
> -
, append_todo_help() is removed from git-rebase--interactive.sh
to use `rebase--helper --append-todo-help` instead.
Signed-off-by: Alban Gruin
---
No changes since v6.
Makefile | 1 +
builtin/rebase--helper.c | 11 --
git-rebase--interactive.sh | 52
or
`--onto` to rebase--interactive2.
- [18/20] Replace "restrict_revisions" by "restrict_revision" in
git-rebase.sh.
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 functi
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
call to comment_for_reflog() is added at the
beginning of this function.
Signed-off-by: Alban Gruin
---
No changes since v6.
builtin/rebase--helper.c | 7 ++-
git-rebase--interactive.sh | 16 ++--
sequencer.c| 30 ++
sequencer.h
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
---
No
use of
run_command_silent_on_success().
Signed-off-by: Alban Gruin
---
No changes since v6.
sequencer.c | 51 +--
1 file changed, 25 insertions(+), 26 deletions(-)
diff --git a/sequencer.c b/sequencer.c
index dd1b060863..eaa1aa7deb 100644
--- a
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
.
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
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
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
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
301 - 400 of 471 matches
Mail list logo