[GSoC][PATCH v3 05/13] sequencer: add a new function to silence a command, except if it fails

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

[GSoC][PATCH v3 03/13] editor: add a function to launch the sequence editor

2018-07-10 Thread Alban Gruin
as a parameter, in addition to the path, the buffer and the environment variables. launch_sequence_editor() is then added to launch the sequence editor. Signed-off-by: Alban Gruin --- cache.h | 1 + editor.c | 27 +-- strbuf.h | 2 ++ 3 files changed, 28 insertions(+), 2

Re: [GSoC][PATCH v2 1/7] sequencer: make two functions and an enum from sequencer.c public

2018-07-05 Thread Alban Gruin
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)

[GSoC] GSoC with git, week 9

2018-07-02 Thread Alban Gruin
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

[GSoC][PATCH v2 7/7] rebase -i: rewrite checkout_onto() in C

2018-07-02 Thread Alban Gruin
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

[GSoC][PATCH v2 6/7] rebase -i: rewrite setup_reflog_action() in C

2018-07-02 Thread Alban Gruin
(), a 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

[GSoC][PATCH v2 4/7] rebase-interactive: rewrite the edit-todo functionality in C

2018-07-02 Thread Alban Gruin
in 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

[GSoC][PATCH v2 3/7] editor: add a function to launch the sequence editor

2018-07-02 Thread Alban Gruin
as a parameter, in addition to the path, the buffer and the environment variables. launch_sequence_editor() is then added to launch the sequence editor. Signed-off-by: Alban Gruin --- cache.h | 1 + editor.c | 27 +-- strbuf.h | 2 ++ 3 files changed, 28 insertions(+), 2

[GSoC][PATCH v2 5/7] sequencer: add a new function to silence a command, except if it fails.

2018-07-02 Thread Alban Gruin
to 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

[GSoC][PATCH v2 2/7] rebase--interactive: rewrite append_todo_help() in C

2018-07-02 Thread Alban Gruin
, 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

[GSoC][PATCH v2 1/7] sequencer: make two functions and an enum from sequencer.c public

2018-07-02 Thread Alban Gruin
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 --- sequencer.c | 22 +- sequencer.h | 8 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/sequencer.c b/sequencer.c index

[GSoC][PATCH v2 0/7] rebase -i: rewrite some parts in C

2018-07-02 Thread Alban Gruin
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

Re: [GSoC][PATCH v5 0/3] rebase -i: rewrite reflog operations in C

2018-07-02 Thread Alban Gruin
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

[GSoC][PATCH v5 2/3] rebase -i: rewrite setup_reflog_action() in C

2018-06-29 Thread Alban Gruin
(), a 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

[GSoC][PATCH v5 0/3] rebase -i: rewrite reflog operations in C

2018-06-29 Thread Alban Gruin
(), 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

[GSoC][PATCH v5 1/3] sequencer: add a new function to silence a command, except if it fails.

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

[GSoC][PATCH v5 3/3] rebase -i: rewrite checkout_onto() in C

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

ag/rebase-i-append-todo-help, was Re: What's cooking in git.git (Jun 2018, #07; Thu, 28)

2018-06-29 Thread Alban Gruin
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.) > >

[GSoC][PATCH v5 2/2] rebase--interactive: rewrite append_todo_help() in C

2018-06-28 Thread Alban Gruin
, 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

[GSoC][PATCH v5 1/2] sequencer: make two functions and an enum from sequencer.c public

2018-06-28 Thread Alban Gruin
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 --- sequencer.c | 22 +- sequencer.h | 8 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/sequencer.c b/sequencer.c index

[GSoC][PATCH v5 0/2] rebase -i: rewrite append_todo_help() in C

2018-06-28 Thread Alban Gruin
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

Re: [GSoC][PATCH v4 0/2] rebase -i: rewrite append_todo_help() in C

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

Re: [GSoC][PATCH v4 1/2] sequencer: make two functions and an enum from sequencer.c public

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

[GSoC][PATCH v3 0/2] rebase -i: rewrite the edit-todo functionality in C

2018-06-26 Thread Alban Gruin
-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

[GSoC][PATCH v3 1/2] editor: add a function to launch the sequence editor

2018-06-26 Thread Alban Gruin
as a parameter, in addition to the path, the buffer and the environment variables. launch_sequence_editor() is then added to launch the sequence editor. Signed-off-by: Alban Gruin --- cache.h | 1 + editor.c | 27 +-- strbuf.h | 2 ++ 3 files changed, 28 insertions(+), 2

[GSoC][PATCH v3 2/2] rebase-interactive: rewrite the edit-todo functionality in C

2018-06-26 Thread Alban Gruin
in 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

[GSoC][PATCH v4 2/2] rebase--interactive: rewrite append_todo_help() in C

2018-06-26 Thread Alban Gruin
, 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

[GSoC][PATCH v4 1/2] sequencer: make two functions and an enum from sequencer.c public

2018-06-26 Thread Alban Gruin
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

[GSoC][PATCH v4 0/2] rebase -i: rewrite append_todo_help() in C

2018-06-26 Thread Alban Gruin
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

[GSoC][PATCH 1/1] sequencer: print an error message if append_todo_help() fails

2018-06-26 Thread Alban Gruin
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

[GSoC][PATCH 0/1] sequencer: print an error message if append_todo_help() fails

2018-06-26 Thread Alban Gruin
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

[GSoC] GSoC with git, week 8

2018-06-25 Thread Alban Gruin
Hi, I published my blog post about last week: https://blog.pa1ch.fr/posts/2018/06/25/en/gsoc2018-week-8.html Cheers, Alban

Re: [GSoC][PATCH v3 2/3] rebase -i: rewrite setup_reflog_action() in C

2018-06-25 Thread Alban Gruin
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

[GSoC][PATCH v4 3/3] rebase -i: rewrite setup_reflog_action() in C

2018-06-25 Thread Alban Gruin
to 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

[GSoC][PATCH v4 0/3] rebase -i: rewrite reflog operations in C

2018-06-25 Thread Alban Gruin
() - 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

[GSoC][PATCH v4 2/3] rebase -i: rewrite checkout_onto() in C

2018-06-25 Thread Alban Gruin
`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

[GSoC][PATCH v4 1/3] sequencer: extract a function to silence a command, except if it fails

2018-06-25 Thread Alban Gruin
() and 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

Re: [GSoC][PATCH v3 2/3] rebase -i: rewrite setup_reflog_action() in C

2018-06-22 Thread Alban Gruin
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

Re: [GSoC][PATCH v3 1/3] sequencer: add a new function to silence a command, except if it fails.

2018-06-22 Thread Alban Gruin
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

[GSoC][PATCH v3 3/3] rebase -i: rewrite checkout_onto() in C

2018-06-21 Thread Alban Gruin
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

[GSoC][PATCH v3 1/3] sequencer: add a new function to silence a command, except if it fails.

2018-06-21 Thread Alban Gruin
to 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

[GSoC][PATCH v3 2/3] rebase -i: rewrite setup_reflog_action() in C

2018-06-21 Thread Alban Gruin
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 files

[GSoC][PATCH v3 0/3] rebase -i: rewrite reflog operations in C

2018-06-21 Thread Alban Gruin
/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

Re: [GSoC][PATCH v2 1/3] sequencer: add a new function to silence a command, except if it fails.

2018-06-21 Thread Alban Gruin
Hi Johannes, Le 21/06/2018 à 11:37, Johannes Schindelin a écrit : > Hi Alban, > > On Tue, 19 Jun 2018, Alban Gruin wrote: > >> diff --git a/sequencer.c b/sequencer.c >> index 7cc76332e..9aa7ddb33 100644 >> --- a/sequencer.c >> +++ b/sequencer.c >>

[GSoC][PATCH v2 3/3] rebase -i: rewrite checkout_onto() in C

2018-06-19 Thread Alban Gruin
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

[GSoC][PATCH v2 2/3] rebase -i: rewrite setup_reflog_action() in C

2018-06-19 Thread Alban Gruin
(). The shell version is then stripped in favour of a call to the helper. As $GIT_REFLOG_ACTION is not longer set at the first call of checkout_onto(), a call to comment_for_reflog() is added at the beginning of this function. Signed-off-by: Alban Gruin --- builtin/rebase--helper.c | 9 +++-- git

[GSoC][PATCH v2 1/3] sequencer: add a new function to silence a command, except if it fails.

2018-06-19 Thread Alban Gruin
output. It is functionnally similar to output() from git-rebase.sh. run_git_commit() is then refactored to use of run_command_silent_on_success(). Signed-off-by: Alban Gruin --- sequencer.c | 55 +-- 1 file changed, 29 insertions(+), 26 deletions

[GSoC][PATCH v2 0/3] rebase -i: rewrite reflog operations in C

2018-06-19 Thread Alban Gruin
() (thanks Phillip!) - Using OPT__VERBOSE to parse the “--verbose” flag (thanks Stefan!) - Fixing some typos and errors in the commit messages - Renaming “setup-reflog” to “checkout-base” - Renaming checkout_base_commit() to run_git_checkout() - Replacing calls to die() by error() Alban

[GSoC] GSoC with git, week 7

2018-06-18 Thread Alban Gruin
Hi, I published a new blog post here: https://blog.pa1ch.fr/posts/2018/06/18/en/gsoc2018-week-7.html It’s shorter than the last one, but feel free to tell me what you think about it! :) Cheers, Alban

Re: [GSoC][PATCH 1/3] sequencer: add a new function to silence a command, except if it fails.

2018-06-18 Thread Alban Gruin
Hi Christian, Le 18/06/2018 à 18:26, Christian Couder a écrit : > Hi Alban, > > On Mon, Jun 18, 2018 at 3:18 PM, Alban Gruin wrote: >> This adds a new function, run_command_silent_if_successful(), > > He re the function is called run_command_silent_if_successful()...

Re: [GSoC][PATCH 2/3] rebase -i: rewrite setup_reflog_action() in C

2018-06-18 Thread Alban Gruin
Hi Phillip, Le 18/06/2018 à 17:34, Phillip Wood a écrit : > On 18/06/18 14:18, Alban Gruin wrote: >> This rewrites setup_reflog_action() from shell to C. >> >> A new command is added to rebase--helper.c, “setup-reflog”, as such as a >> new flag, “verbose”, to silence

Re: [GSoC][PATCH 3/3] rebase -i: rewrite checkout_onto() in C

2018-06-18 Thread Alban Gruin
Hi Phillip, Le 18/06/2018 à 18:09, Phillip Wood a écrit : >> +    if (get_oid(orig_head, )) >> +    die(_("%s: not a valid OID"), orig_head); > > If this code is going to live long-term in sequencer.c then it would be > better not to die, but return an error instead as it's part of libgit. >

Re: [GSoC][PATCH 1/3] sequencer: add a new function to silence a command, except if it fails.

2018-06-18 Thread Alban Gruin
Hi Phillip, Le 18/06/2018 à 17:26, Phillip Wood a écrit : > Hi Alban > > On 18/06/18 14:18, Alban Gruin wrote: >> This adds a new function, run_command_silent_if_successful(), to >> redirect the stdout and stderr of a command to a strbuf, and then to run >> that comm

[GSoC][PATCH 3/3] rebase -i: rewrite checkout_onto() in C

2018-06-18 Thread Alban Gruin
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

[GSoC][PATCH 2/3] rebase -i: rewrite setup_reflog_action() in C

2018-06-18 Thread Alban Gruin
. As $GIT_REFLOG_ACTION is not longer set at the first call of checkout_onto(), a 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

[GSoC][PATCH 0/3] rebase -i: rewrite reflog operations in C

2018-06-18 Thread Alban Gruin
/rebase-i-rewrite-todo, and does not conflict with pu (as of 2018-06-18). 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

[GSoC][PATCH 1/3] sequencer: add a new function to silence a command, except if it fails.

2018-06-18 Thread Alban Gruin
to use of run_command_silent_if_successful(). Signed-off-by: Alban Gruin --- sequencer.c | 53 +++-- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/sequencer.c b/sequencer.c index 7cc76332e..3437673d2 100644 --- a/sequencer.c +++ b

Re: [GSoC][PATCH v2 2/2] rebase--interactive: rewrite the edit-todo functionality in C

2018-06-14 Thread Alban Gruin
Hi Junio, Le 14/06/2018 à 22:14, Junio C Hamano a écrit : > Alban Gruin writes: > >> diff --git a/builtin/rebase--helper.c b/builtin/rebase--helper.c >> index ded5e291d..d2990b210 100644 >> --- a/builtin/rebase--helper.c >> +++ b/builtin/rebase--helper.c >> @

[GSoC][PATCH v2 0/2] rebase -i: rewrite the edit-todo functionality in C

2018-06-13 Thread Alban Gruin
-08311a0bb...@talktalk.net/ 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

[GSoC][PATCH v2 2/2] rebase--interactive: rewrite the edit-todo functionality in C

2018-06-13 Thread Alban Gruin
in favour of a call to the helper. Signed-off-by: Alban Gruin --- builtin/rebase--helper.c | 13 - git-rebase--interactive.sh | 11 +-- sequencer.c| 31 +++ sequencer.h| 1 + 4 files changed, 41 insertions(+), 15

[GSoC][PATCH v2 1/2] editor: add a function to launch the sequence editor

2018-06-13 Thread Alban Gruin
as a parameter, in addition to the path, the buffer and the environment variables. launch_sequence_editor() is then added to launch the sequence editor. Signed-off-by: Alban Gruin --- cache.h | 1 + editor.c | 27 +-- strbuf.h | 2 ++ 3 files changed, 28 insertions(+), 2

Re: [GSoC][PATCH 1/1] rebase--interactive: rewrite the edit-todo functionality in C

2018-06-12 Thread Alban Gruin
Hi Elijah, Le 12/06/2018 à 17:46, Elijah Newren a écrit : > Hi Alban, > > On Mon, Jun 11, 2018 at 6:57 AM, Alban Gruin wrote: >> This rewrites the edit-todo functionality from shell to C. >> >> To achieve that, a new command mode, `edit-todo`, is added, and th

Re: [GSoC][PATCH 1/1] rebase--interactive: rewrite the edit-todo functionality in C

2018-06-12 Thread Alban Gruin
Hi Phillip, Le 11/06/2018 à 17:32, Phillip Wood a écrit : >> +    if (launch_editor(todo_file, NULL, NULL)) > > I'm not sure that this will respect GIT_SEQUENCE_EDITOR, it would be > nice to have a launch_sequence_editor() function that shared as much > code as possible with launch_editor() >

[GSoC] GSoC with git, week 6

2018-06-11 Thread Alban Gruin
Hi, I published a new blog post about last week: https://blog.pa1ch.fr/posts/2018/06/11/en/gsoc2018-week-6.html Any feedback is welcome! :) Cheers, Alban

[GSoC][PATCH 0/1] rebase -i: rewrite the edit-todo functionality in C

2018-06-11 Thread Alban Gruin
This patch rewrites the edit-todo functionality from shell to C. This is part of the effort to rewrite interactive rebase in C. Alban Gruin (1): rebase--interactive: rewrite the edit-todo functionality in C builtin/rebase--helper.c | 13 - git-rebase--interactive.sh | 11

[GSoC][PATCH 1/1] rebase--interactive: rewrite the edit-todo functionality in C

2018-06-11 Thread Alban Gruin
in favour of a call to the helper. Signed-off-by: Alban Gruin --- builtin/rebase--helper.c | 13 - git-rebase--interactive.sh | 11 +-- sequencer.c| 31 +++ sequencer.h| 1 + 4 files changed, 41 insertions(+), 15

[GSoC][PATCH v3 1/1] rebase--interactive: rewrite append_todo_help() in C

2018-06-07 Thread Alban Gruin
append_todo_help() to write the help text suited for the edit-todo mode (`--write-edit-todo`). Finally, append_todo_help() is removed from git-rebase--interactive.sh to use `rebase--helper --append-todo-help` instead. Signed-off-by: Alban Gruin --- builtin/rebase--helper.c | 10 ++-- git-rebase

[GSoC][PATCH v3 0/1] rebase -i: rewrite append_todo_help() in C

2018-06-07 Thread Alban Gruin
` to `write_edit_todo` to avoid confusions, after a comment by Christian Couder[1]. [1] https://github.com/git/git/pull/503#discussion_r193392270 Alban Gruin (1): rebase--interactive: rewrite append_todo_help() in C builtin/rebase--helper.c | 10 ++-- git-rebase--interactive.sh | 52

[GSoC][PATCH v2 0/1] rebase -i: rewrite append_todo_help() in C

2018-06-05 Thread Alban Gruin
the edit-todo message from `edit-todo` to `write-edit-todo`. - Clarifying the `write-edit-todo` help message. - Dropping the commit that removed newlines in the messages. Alban Gruin (1): rebase--interactive: rewrite append_todo_help() in C builtin/rebase--helper.c | 10 ++-- git

[GSoC][PATCH v2 1/1] rebase--interactive: rewrite append_todo_help() in C

2018-06-05 Thread Alban Gruin
append_todo_help() to write the help text suited for the edit-todo mode (`--write-edit-todo`). Finally, append_todo_help() is removed from git-rebase--interactive.sh to use `rebase--helper --append-todo-help` instead. Signed-off-by: Alban Gruin --- builtin/rebase--helper.c | 10 ++-- git-rebase

[GSoC] GSoC with git, week 5

2018-06-03 Thread Alban Gruin
Hi, I wrote a post about this week. Unfortunately, I have a technical issue with my website, so you can find it right in this email instead. I’m sorry about that. I will publish it on my blog as soon as it comes back online. Feel free to give me your feedback! Cheers, Alban -- As you may

Re: [GSoC][PATCH 0/2] rebase -i: rewrite append_todo_help() in C

2018-05-31 Thread Alban Gruin
Hi Stefan, Le 31/05/2018 à 20:44, Stefan Beller a écrit : > On Thu, May 31, 2018 at 10:48 AM, Phillip Wood > wrote: >> Hi Alban, it's great to see you working on this >> >> On 31/05/18 12:01, Alban Gruin wrote: >>> This series rewrites append_todo_hel

Re: [GSoC][PATCH 0/2] rebase -i: rewrite append_todo_help() in C

2018-05-31 Thread Alban Gruin
Hi Phillip, Le 31/05/2018 à 19:48, Phillip Wood a écrit : > Hi Alban, it's great to see you working on this > > On 31/05/18 12:01, Alban Gruin wrote: >> This series rewrites append_todo_help() from shell to C. This is part >> of the effort to rewrite interactive rebase

[GSoC][PATCH 0/2] rebase -i: rewrite append_todo_help() in C

2018-05-31 Thread Alban Gruin
strips newlines from append_todo_help() messages, which require to update the translations. This change was advised to me by Stefan Beller, but Johannes Schindelin voiced concerns. I don’t really have a strong opinion about it, so feel free to give yours. Alban Gruin (2): rebase--interactive: rewrite

[GSoC][PATCH 1/2] rebase--interactive: rewrite append_todo_help() in C

2018-05-31 Thread Alban Gruin
append_todo_help() to write the help text suited for the edit-todo mode (`--edit-todo`). Finally, append_todo_help() is removed from git-rebase--interactive.sh to use `rebase--helper --append-todo-help` instead. Signed-off-by: Alban Gruin --- builtin/rebase--helper.c | 10 ++-- git-rebase

[GSoC][PATCH 2/2] sequencer: remove newlines from append_todo_help() messages

2018-05-31 Thread Alban Gruin
`strbuf_add_commented_lines()` automatically inserts a newline at the end of the input, and ignore the last from the input. Signed-off-by: Alban Gruin --- sequencer.c | 24 ++-- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/sequencer.c b/sequencer.c index

[GSoC][PATCH v4 1/4] rebase: introduce a dedicated backend for --preserve-merges

2018-05-28 Thread Alban Gruin
This duplicates git-rebase--interactive.sh to git-rebase--preserve-merges.sh. This is done to split -p from -i. No modifications are made to this file here, but any code that is not used by -p will be stripped in the next commit. Signed-off-by: Alban Gruin <alban.gr...@gmail.com> --- .git

[GSoC][PATCH v4 2/4] rebase: strip unused code in git-rebase--preserve-merges.sh

2018-05-28 Thread Alban Gruin
, this will be the only script to be converted. This also seems to fix a bug where a failure in `pick_one_preserving_merges()` would fallback to the non-preserve-merges `pick_one()`. Signed-off-by: Alban Gruin <alban.gr...@gmail.com> --- git-rebase--preserve-merges.s

[GSoC][PATCH v4 3/4] rebase: use the new git-rebase--preserve-merges.sh

2018-05-28 Thread Alban Gruin
t;/rewritten left by the preserve-merges script when calling rebase --continue, --skip, etc., and, if it exists, sets the rebase mode to preserve-merges. In this case, interactive_rebase is set to "explicit", as "implied" would break some tests. Signed-off-by: Alban Gruin <alba

[GSoC][PATCH v4 4/4] rebase: remove -p code from git-rebase--interactive.sh

2018-05-28 Thread Alban Gruin
All the code specific to preserve-merges was moved to git-rebase--preserve-merges.sh, and so it’s useless to keep it here. The intent of this commit is to clean this script as much as possible to prepare a peaceful conversion as a builtin written in C. Signed-off-by: Alban Gruin <alban

[GSoC][PATCH v4 0/4] rebase: split rebase -p from rebase -i

2018-05-28 Thread Alban Gruin
. Changes since v3: - Rewording the commits to be more descriptive, and to respect the 72 characters limit. Alban Gruin (4): rebase: introduce a dedicated backend for --preserve-merges rebase: strip unused code in git-rebase--preserve-merges.sh rebase: use the new git-rebase--preserve

[GSoC] GSoC with git, week 4

2018-05-26 Thread Alban Gruin
Hi, I published my blog post about this week. You can read it here: https://blog.pa1ch.fr/posts/2018/05/26/en/gsoc2018-week-4.html All comments are welcome! Cheers, Alban

Re: [GSoC][PATCH v3 0/4] rebase: split rebase -p from rebase -i

2018-05-24 Thread Alban Gruin
Hi, Le 24/05/2018 à 13:49, Alban Gruin a écrit : > Changes since v2: - Removing `mark_action_done()` from git-rebase--interactive.sh - Removing unused variables from git-rebase--interactive.sh Cheers, Alban

[GSoC][PATCH v3 1/4] rebase: duplicate git-rebase--interactive.sh to git-rebase--preserve-merges.sh

2018-05-24 Thread Alban Gruin
This duplicates git-rebase--interactive.sh to git-rebase--preserve-merges.sh. This is done to split -p from -i. No modifications are made to this file here, but any code that is not used by -p will be stripped in the next commit. Signed-off-by: Alban Gruin <alban.gr...@gmail.com> --- .git

[GSoC][PATCH v3 2/4] rebase: strip unused code in git-rebase--preserve-merges.sh

2018-05-24 Thread Alban Gruin
This removes the code coming from git-rebase--interactive.sh that is not needed by preserve-merges. Signed-off-by: Alban Gruin <alban.gr...@gmail.com> --- git-rebase--preserve-merges.sh | 65 +++--- 1 file changed, 4 insertions(+), 61 deletions(-) diff

[GSoC][PATCH v3 0/4] rebase: split rebase -p from rebase -i

2018-05-24 Thread Alban Gruin
. Changes since v2: - Removing ` Alban Gruin (4): rebase: duplicate git-rebase--interactive.sh to git-rebase--preserve-merges.sh rebase: strip unused code in git-rebase--preserve-merges.sh rebase: use the new git-rebase--preserve-merges.sh rebase: remove -p code from git-rebase

[GSoC][PATCH v3 4/4] rebase: remove -p code from git-rebase--interactive.sh

2018-05-24 Thread Alban Gruin
All the code specific to preserve-merges was moved to git-rebase--preserve-merges.sh, and so it’s useless to keep it here. Signed-off-by: Alban Gruin <alban.gr...@gmail.com> --- git-rebase--interactive.sh | 802 + 1 file changed, 8 insertions(+

[GSoC][PATCH v3 3/4] rebase: use the new git-rebase--preserve-merges.sh

2018-05-24 Thread Alban Gruin
t;/rewritten left by the preserve-merges script when calling rebase --continue, --skip, etc., and, if it exists, sets the rebase mode to preserve-merges. In this case, interactive_rebase is set to "explicit", as "implied" would break some tests. Signed-off-by: Alban Gruin <alba

[GSoC][PATCH v2 4/4] rebase: remove -p code from git-rebase--interactive.sh

2018-05-22 Thread Alban Gruin
All the code specific to preserve-merges was moved to git-rebase--preserve-merges.sh, and so it’s useless to keep it here. Signed-off-by: Alban Gruin <alban.gr...@gmail.com> --- git-rebase--interactive.sh | 708 + 1 file changed, 8 insertions(+

[GSoC][PATCH v2 3/4] rebase: use the new git-rebase--preserve-merges.sh

2018-05-22 Thread Alban Gruin
t;/rewritten left by the preserve-merges script when calling rebase --continue, --skip, etc., and, if it exists, sets the rebase mode to preserve-merges. In this case, interactive_rebase is set to "explicit", as "implied" would break some tests. Signed-off-by: Alban Gruin <alba

[GSoC][PATCH v2 1/4] rebase: duplicate git-rebase--interactive.sh to git-rebase--preserve-merges.sh

2018-05-22 Thread Alban Gruin
This duplicates git-rebase--interactive.sh to git-rebase--preserve-merges.sh. This is done to split -p from -i. No modifications are made to this file here, but any code that is not used by -p will be stripped in the next commit. Signed-off-by: Alban Gruin <alban.gr...@gmail.com> --- .git

[GSoC][PATCH v2 2/4] rebase: strip unused code in git-rebase--preserve-merges.sh

2018-05-22 Thread Alban Gruin
This removes the code coming from git-rebase--interactive.sh that is not needed by preserve-merges. Signed-off-by: Alban Gruin <alban.gr...@gmail.com> --- git-rebase--preserve-merges.sh | 65 +++--- 1 file changed, 4 insertions(+), 61 deletions(-) diff

[GSoC][PATCH v2 0/4] rebase: split rebase -p from rebase -i

2018-05-22 Thread Alban Gruin
. Changes since v1: - Duplicating the correct version of git-rebase--interactive.sh (thanks Stefan!) Alban Gruin (4): rebase: duplicate git-rebase--interactive.sh to git-rebase--preserve-merges.sh rebase: strip unused code in git-rebase--preserve-merges.sh rebase: use the new git-rebase

Re: [GSoC][PATCH 1/4] rebase: duplicate git-rebase--interactive.sh to git-rebase--preserve-merges.sh

2018-05-22 Thread Alban Gruin
Hi Stefan, Le 22/05/2018 à 20:26, Stefan Beller a écrit : > On Tue, May 22, 2018 at 6:31 AM, Alban Gruin <alban.gr...@gmail.com> wrote: >> This duplicates git-rebase--interactive.sh to >> git-rebase--preserve-merges.sh. This is done to split -p from -i. No >> modifica

[GSoC][PATCH 2/4] rebase: strip unused code in git-rebase--preserve-merges.sh

2018-05-22 Thread Alban Gruin
This removes the code coming from git-rebase--interactive.sh that is not needed by preserve-merges. Signed-off-by: Alban Gruin <alban.gr...@gmail.com> --- git-rebase--preserve-merges.sh | 63 +++--- 1 file changed, 4 insertions(+), 59 deletions(-) diff

[GSoC][PATCH 1/4] rebase: duplicate git-rebase--interactive.sh to git-rebase--preserve-merges.sh

2018-05-22 Thread Alban Gruin
This duplicates git-rebase--interactive.sh to git-rebase--preserve-merges.sh. This is done to split -p from -i. No modifications are made to this file here, but any code that is not used by -p will be stripped in the next commit. Signed-off-by: Alban Gruin <alban.gr...@gmail.com> --- .git

[GSoC][PATCH 4/4] rebase: remove -p code from git-rebase--interactive.sh

2018-05-22 Thread Alban Gruin
All the code specific to preserve-merges was moved to git-rebase--preserve-merges.sh, and so it’s useless to keep it here. Signed-off-by: Alban Gruin <alban.gr...@gmail.com> --- git-rebase--interactive.sh | 708 + 1 file changed, 8 insertions(+

[GSoC][PATCH 3/4] rebase: use the new git-rebase--preserve-merges.sh

2018-05-22 Thread Alban Gruin
t;/rewritten left by the preserve-merges script when calling rebase --continue, --skip, etc., and, if it exists, sets the rebase mode to preserve-merges. In this case, interactive_rebase is set to "explicit", as "implied" would break some tests. Signed-off-by: Alban Gruin <alba

[GSoC][PATCH 0/4] rebase: split rebase -p from rebase -i

2018-05-22 Thread Alban Gruin
is also removed. This patch series is based of js/sequencer-and-root-commits. Alban Gruin (4): rebase: duplicate git-rebase--interactive.sh to git-rebase--preserve-merges.sh rebase: strip unused code in git-rebase--preserve-merges.sh rebase: use the new git-rebase--preserve-merges.sh

[GSoC] GSoC with git, week 3

2018-05-20 Thread Alban Gruin
Hi, I published a new post about this week. You can read it here: https://blog.pa1ch.fr/posts/2018/05/20/en/gsoc2018-week-3.html Feel free to give me your feedback! :) Cheers, Alban

<    1   2   3   4   >