Re: [PATCH v2 04/16] sequencer: introduce todo_list_write_to_file()

2018-10-30 Thread Phillip Wood
Hi Alban I like the direction this is going, it is an improvement on re-scanning the list at the end of each function. On 27/10/2018 22:29, Alban Gruin wrote: This introduce a new function to recreate the text of a todo list from its commands, and then to write it to the disk. This will be u

[PATCH v3 3/5] am: rename read_author_script()

2018-10-30 Thread Phillip Wood
From: Phillip Wood Rename read_author_script() in preparation for adding a shared read_author_script() function to libgit. Signed-off-by: Phillip Wood --- builtin/am.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builtin/am.c b/builtin/am.c index d42b725273

[PATCH v3 4/5] add read_author_script() to libgit

2018-10-30 Thread Phillip Wood
From: Phillip Wood Add read_author_script() to sequencer.c based on the implementation in builtin/am.c and update read_am_author_script() to use read_author_script(). The sequencer code that reads the author script will be updated in the next commit. Signed-off-by: Phillip Wood --- Notes

[PATCH v3 1/5] am: don't die in read_author_script()

2018-10-30 Thread Phillip Wood
From: Phillip Wood The caller is already prepared to handle errors returned from this function so there is no need for it to die if it cannot read the file. Suggested-by: Eric Sunshine Signed-off-by: Phillip Wood --- builtin/am.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

[PATCH v3 5/5] sequencer: use read_author_script()

2018-10-30 Thread Phillip Wood
From: Phillip Wood Use the new function added in the last commit to read the author script, updating read_env_script() and read_author_ident(). We now have a single code path that reads the author script for am and all flavors of rebase. This changes the behavior of read_env_script() as

[PATCH v3 2/5] am: improve author-script error reporting

2018-10-30 Thread Phillip Wood
From: Phillip Wood If there are errors in a user edited author-script there was no indication of what was wrong. This commit adds some specific error messages depending on the problem. It also relaxes the requirement that the variables appear in a specific order in the file to match the behavior

[PATCH v3 0/5] am/rebase: share read_author_script()

2018-10-30 Thread Phillip Wood
From: Phillip Wood Thanks to Junio for the feedback on v2. I've updated patch 4 based on those comments, the rest are unchanged. v1 cover letter: This is a follow up to pw/rebase-i-author-script-fix, it reduces code duplication and improves rebase's parsing of the author script.

Re: [PATCH v2 0/5] am/rebase: share read_author_script()

2018-10-26 Thread Phillip Wood
Hi Junio On 25/10/2018 09:59, Junio C Hamano wrote: > Phillip Wood writes: > >> From: Phillip Wood >> >> Thanks to Eric for his feedback on v1. I've rerolled based on >> that. Patches 1 & 2 are new and try to address some of the concerns >> Eric

[PATCH v2 4/5] add read_author_script() to libgit

2018-10-18 Thread Phillip Wood
From: Phillip Wood Add read_author_script() to sequencer.c based on the implementation in builtin/am.c and update read_am_author_script() to use read_author_script(). The sequencer code that reads the author script will be updated in the next commit. Signed-off-by: Phillip Wood --- Notes

[PATCH v2 5/5] sequencer: use read_author_script()

2018-10-18 Thread Phillip Wood
From: Phillip Wood Use the new function added in the last commit to read the author script, updating read_env_script() and read_author_ident(). We now have a single code path that reads the author script for am and all flavors of rebase. This changes the behavior of read_env_script() as

[PATCH v2 1/5] am: don't die in read_author_script()

2018-10-18 Thread Phillip Wood
From: Phillip Wood The caller is already prepared to handle errors returned from this function so there is no need for it to die if it cannot read the file. Suggested-by: Eric Sunshine Signed-off-by: Phillip Wood --- builtin/am.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

[PATCH v2 0/5] am/rebase: share read_author_script()

2018-10-18 Thread Phillip Wood
From: Phillip Wood Thanks to Eric for his feedback on v1. I've rerolled based on that. Patches 1 & 2 are new and try to address some of the concerns Eric raised, particularly the error handling for a badly edited author script. See the notes on patches 4 & 5 for the changes to tho

[PATCH v2 3/5] am: rename read_author_script()

2018-10-18 Thread Phillip Wood
From: Phillip Wood Rename read_author_script() in preparation for adding a shared read_author_script() function to libgit. Signed-off-by: Phillip Wood --- builtin/am.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builtin/am.c b/builtin/am.c index d42b725273

[PATCH v2 2/5] am: improve author-script error reporting

2018-10-18 Thread Phillip Wood
From: Phillip Wood If there are errors in a user edited author-script there was no indication of what was wrong. This commit adds some specific error messages depending on the problem. It also relaxes the requirement that the variables appear in a specific order in the file to match the behavior

Re: What's cooking in git.git (Oct 2018, #01; Wed, 10)

2018-10-16 Thread Phillip Wood
On 12/10/2018 14:36, Junio C Hamano wrote: Phillip Wood writes: It would be nice if the parsing used starts_with(option_name, user_text) rather than strcmp() as well. Also I think --color-moved=no is valid as a synonym of --no-color-moved but --color-moved-ws=no is not supported. I am not

Re: [PATCH v2 2/2] rebase -i: introduce the 'break' command

2018-10-12 Thread Phillip Wood
Hi Johannes On 12/10/2018 09:35, Johannes Schindelin wrote: > Hi Phillip, > > On Thu, 11 Oct 2018, Phillip Wood wrote: > >> I think this would be a useful addition to rebase, there's one small >> comment below. >> >> On 10/10/2018 09:53, Johannes Sc

Re: What's cooking in git.git (Oct 2018, #01; Wed, 10)

2018-10-12 Thread Phillip Wood
On 11/10/2018 23:40, Junio C Hamano wrote: > Phillip Wood writes: > >> On 10/10/2018 06:43, Junio C Hamano wrote: >>> Here are the topics that have been cooking. Commits prefixed with >>> '-' are only in 'pu' (proposed updates) while commits pre

Re: [PATCH 04/15] sequencer: refactor sequencer_add_exec_commands() to work on a todo_list

2018-10-12 Thread Phillip Wood
On 11/10/2018 17:57, Alban Gruin wrote: > Hi Phillip, > > thanks for taking the time to review my patches. > > Le 11/10/2018 à 13:25, Phillip Wood a écrit : >> On 07/10/2018 20:54, Alban Gruin wrote: >>> @@ -4419,15 +4406,38 @@ int sequencer_add_exec_com

Re: [PATCH 10/15] rebase-interactive: use todo_list_transform() in edit_todo_list()

2018-10-11 Thread Phillip Wood
On 07/10/2018 20:54, Alban Gruin wrote: 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_transform() instead.

Re: [PATCH 08/15] sequencer: change complete_action() to use the refactored functions

2018-10-11 Thread Phillip Wood
On 07/10/2018 20:54, Alban Gruin wrote: complete_action() used functions that read the todo-list file, made some changes to it, and wrote it back to the disk. The previous commits were dedicated to separate the part that deals with the file from the actual logic of these functions. Now that thi

Re: [PATCH 04/15] sequencer: refactor sequencer_add_exec_commands() to work on a todo_list

2018-10-11 Thread Phillip Wood
On 07/10/2018 20:54, Alban Gruin wrote: This refactors sequencer_add_exec_commands() to work on a todo_list to avoid redundant reads and writes to the disk. sequencer_add_exec_commands() still reads the todo list from the disk, as it is needed by rebase -p. todo_list_add_exec_commands() works o

Re: [PATCH 03/15] sequencer: refactor check_todo_list() to work on a todo_list

2018-10-11 Thread Phillip Wood
Hi Alban I like the direction that this series is going On 07/10/2018 20:54, Alban Gruin wrote: This refactors check_todo_list() to work on a todo_list to avoid redundant reads and writes to the disk. The function is renamed todo_list_check(). As rebase -p still need to check the todo list fr

Re: [PATCH] revert & cherry-pick: run git gc --auto

2018-10-11 Thread Phillip Wood
Hi Ævar On 11/10/2018 11:08, Ævar Arnfjörð Bjarmason wrote: On Thu, Oct 11 2018, Phillip Wood wrote: Hi Ævar On 10/10/2018 20:35, Ævar Arnfjörð Bjarmason wrote: Expand on the work started in 095c741edd ("commit: run git gc --auto just before the post-commit hook", 2018-02-28)

Re: [PATCH] revert & cherry-pick: run git gc --auto

2018-10-11 Thread Phillip Wood
Hi Ævar On 10/10/2018 20:35, Ævar Arnfjörð Bjarmason wrote: > Expand on the work started in 095c741edd ("commit: run git gc --auto > just before the post-commit hook", 2018-02-28) to run "gc --auto" in > more commands where new objects can be created. > > The notably missing commands are now "reb

Re: [PATCH v2 2/2] rebase -i: introduce the 'break' command

2018-10-11 Thread Phillip Wood
Hi Johannes I think this would be a useful addition to rebase, there's one small comment below. On 10/10/2018 09:53, Johannes Schindelin via GitGitGadget wrote: > From: Johannes Schindelin > > The 'edit' command can be used to cherry-pick a commit and then > immediately drop out of the interact

Re: [RFC PATCH 3/3] diff: add --color-moved-ws=allow-mixed-indentation-change

2018-10-10 Thread Phillip Wood
On 09/10/2018 22:10, Stefan Beller wrote: As I said above I've more or less come to the view that the correctness of pythonic indentation is orthogonal to move detection as it affects all additions, not just those that correspond to moved lines. Makes sense. Right so are you happy for we to r

Re: What's cooking in git.git (Oct 2018, #01; Wed, 10)

2018-10-10 Thread Phillip Wood
On 10/10/2018 06:43, Junio C Hamano wrote: Here are the topics that have been cooking. Commits prefixed with '-' are only in 'pu' (proposed updates) while commits prefixed with '+' are in 'next'. The ones marked with '.' do not appear in any of the integration branches, but I am still holding o

Re: [PATCH 3/3] sequencer: use read_author_script()

2018-10-10 Thread Phillip Wood
On 14/09/2018 01:31, Eric Sunshine wrote: > On Wed, Sep 12, 2018 at 6:11 AM Phillip Wood > wrote: >> Use the new function to read the author script, updating >> read_env_script() and read_author_ident(). This means we now have a >> single code path that reads th

Re: [PATCH 2/3] add read_author_script() to libgit

2018-10-10 Thread Phillip Wood
Hi Eric Thanks for looking at this series, sorry it has taken so long for me to reply. On 14/09/2018 00:49, Eric Sunshine wrote: > On Wed, Sep 12, 2018 at 6:11 AM Phillip Wood > wrote: >> Add read_author_script() to sequencer.c based on the implementation in >> built

[RFC PATCH 3/3] diff: add --color-moved-ws=allow-mixed-indentation-change

2018-10-09 Thread Phillip Wood
Hi Stefan Thanks for all your comments on this, they've been really helpful. On 25/09/2018 02:07, Stefan Beller wrote: > On Mon, Sep 24, 2018 at 3:06 AM Phillip Wood > wrote: >> >> From: Phillip Wood >> >> This adds another mode for highlighting lines tha

Re: [PATCH v4 4/4] rebase --skip: clean up commit message after a failed fixup/squash

2018-10-08 Thread Phillip Wood
Hi Johannes On 02/10/2018 14:50, Johannes Schindelin wrote: Hi Phillip, [sorry, I just got to this mail now] Don't worry, I'm impressed you remembered it, I'd completely forgotten about it. On Sun, 6 May 2018, Phillip Wood wrote: On 27/04/18 21:48, Johannes Schindelin

[PATCH v2 5/5] diff --color-moved: fix a memory leak

2018-10-04 Thread Phillip Wood
From: Phillip Wood Free the hashmap items as well as the hashmap itself. This was found with asan. Signed-off-by: Phillip Wood --- diff.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/diff.c b/diff.c index 69f6309db6..100d24b9c4 100644 --- a/diff.c +++ b/diff.c

[PATCH v2 4/5] diff --color-moved-ws: fix another memory leak

2018-10-04 Thread Phillip Wood
From: Phillip Wood This is obvious in retrospect, it was found with asan. Signed-off-by: Phillip Wood --- diff.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/diff.c b/diff.c index 9bf41bad0d..69f6309db6 100644 --- a/diff.c +++ b/diff.c @@ -969,6 +969,8 @@ static void

[PATCH v2 0/5] diff --color-moved-ws: fix double free crash

2018-10-04 Thread Phillip Wood
From: Phillip Wood Thanks to Stefan and Martin for their comments on v1. This version has some small changes to patches 1-3 based on that feedback - see the individual patches for what has changed. Phillip Wood (5): diff --color-moved-ws: fix double free crash diff --color-moved-ws: fix out

[PATCH v2 2/5] diff --color-moved-ws: fix out of bounds string access

2018-10-04 Thread Phillip Wood
From: Phillip Wood When adjusting the start of the string to take account of the change in indentation the code was not checking that the string being adjusted was in fact longer than the indentation change. This was detected by asan. Signed-off-by: Phillip Wood --- Notes: Changes since

[PATCH v2 1/5] diff --color-moved-ws: fix double free crash

2018-10-04 Thread Phillip Wood
From: Phillip Wood Running git diff --color-moved-ws=allow-indentation-change v2.18.0 v2.19.0 results in a crash due to a double free. This happens when two potential moved blocks start with consecutive lines. As pmb_advance_or_null_multi_match() advances it copies the ws_delta from the last

[PATCH v2 3/5] diff --color-moved-ws: fix a memory leak

2018-10-04 Thread Phillip Wood
From: Phillip Wood Don't duplicate the indentation string if we're not going to use it. This was found with asan. Signed-off-by: Phillip Wood --- Notes: Changes since v1: - simplified code as suggested by Martin Ågren diff.c | 5 - 1 file changed, 4 insertions(+),

Re: [PATCH 3/5] diff --color-moved-ws: fix a memory leak

2018-10-03 Thread Phillip Wood
On 02/10/2018 20:08, Stefan Beller wrote: > On Tue, Oct 2, 2018 at 10:55 AM Phillip Wood > wrote: >> >> From: Phillip Wood >> >> Don't duplicate the indentation string if we're not going to use it. >> This was found with asan. > > Makes sen

Re: [PATCH 2/5] diff --color-moved-ws: fix out of bounds string access

2018-10-03 Thread Phillip Wood
On 02/10/2018 19:58, Stefan Beller wrote: > On Tue, Oct 2, 2018 at 10:55 AM Phillip Wood > wrote: >> >> From: Phillip Wood >> >> When adjusting the start of the string to take account of the change >> in indentation the code was not checking that the string

Re: [PATCH 1/5] diff --color-moved-ws: fix double free crash

2018-10-03 Thread Phillip Wood
Hi Stefan Thanks for looking at these patches On 02/10/2018 19:49, Stefan Beller wrote: > On Tue, Oct 2, 2018 at 10:55 AM Phillip Wood > wrote: > >> The solution is to store the ws_delta in the array of potential moved >> blocks rather than with the lines. This means th

[PATCH 5/5] diff --color-moved: fix a memory leak

2018-10-02 Thread Phillip Wood
From: Phillip Wood Free the hashmap items as well as the hashmap itself. This was found with asan. Signed-off-by: Phillip Wood --- diff.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/diff.c b/diff.c index 4464feacf8..94cc1b5592 100644 --- a/diff.c +++ b/diff.c

[PATCH 1/5] diff --color-moved-ws: fix double free crash

2018-10-02 Thread Phillip Wood
From: Phillip Wood Running git diff --color-moved-ws=allow-indentation-change v2.18.0 v2.19.0 results in a crash due to a double free. This happens when two potential moved blocks start with consecutive lines. As pmb_advance_or_null_multi_match() advances it copies the ws_delta from the last

[PATCH 4/5] diff --color-moved-ws: fix another memory leak

2018-10-02 Thread Phillip Wood
From: Phillip Wood This is obvious in retrospect, it was found with asan. Signed-off-by: Phillip Wood --- diff.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/diff.c b/diff.c index efadd05c90..4464feacf8 100644 --- a/diff.c +++ b/diff.c @@ -971,6 +971,8 @@ static void

[PATCH 3/5] diff --color-moved-ws: fix a memory leak

2018-10-02 Thread Phillip Wood
From: Phillip Wood Don't duplicate the indentation string if we're not going to use it. This was found with asan. Signed-off-by: Phillip Wood --- diff.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/diff.c b/diff.c index 0096bdc339..efadd05c90 100644 --

[PATCH 2/5] diff --color-moved-ws: fix out of bounds string access

2018-10-02 Thread Phillip Wood
From: Phillip Wood When adjusting the start of the string to take account of the change in indentation the code was not checking that the string being adjusted was in fact longer than the indentation change. This was detected by asan. Signed-off-by: Phillip Wood --- diff.c | 2 +- 1 file

Re: [RFC PATCH 0/3] diff --color-moved-ws: allow mixed spaces and tabs in indentation change

2018-09-24 Thread Phillip Wood
On 24/09/2018 11:06, Phillip Wood wrote: > From: Phillip Wood > > When trying out the new --color-moved-ws=allow-indentation-change I > was disappointed to discover it did not work if the indentation > contains a mix of spaces and tabs. This series adds a new option that > doe

[RFC PATCH 2/3] diff.c: remove unused variables

2018-09-24 Thread Phillip Wood
From: Phillip Wood The string lengths are not used in cmp_in_block_with_wsd() so lets remove them. Signed-off-by: Phillip Wood --- diff.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/diff.c b/diff.c index 9393993e33..0a652e28d4 100644 --- a/diff.c +++ b/diff.c

[RFC PATCH 3/3] diff: add --color-moved-ws=allow-mixed-indentation-change

2018-09-24 Thread Phillip Wood
From: Phillip Wood This adds another mode for highlighting lines that have moved with an indentation change. Unlike the existing --color-moved-ws=allow-indentation-change setting this mode uses the visible change in the indentation to group lines, rather than the indentation string. This means

[RFC PATCH 0/3] diff --color-moved-ws: allow mixed spaces and tabs in indentation change

2018-09-24 Thread Phillip Wood
From: Phillip Wood When trying out the new --color-moved-ws=allow-indentation-change I was disappointed to discover it did not work if the indentation contains a mix of spaces and tabs. This series adds a new option that does. It's and RFC as there are some open questions about how to pr

[RFC PATCH 1/3] xdiff-interface: make xdl_blankline() available

2018-09-24 Thread Phillip Wood
From: Phillip Wood This will be used by the move detection code. Signed-off-by: Phillip Wood --- xdiff-interface.c | 5 + xdiff-interface.h | 5 + 2 files changed, 10 insertions(+) diff --git a/xdiff-interface.c b/xdiff-interface.c index 9315bc0ede..eceabfa72d 100644 --- a/xdiff

Re: [PATCH] add -p: coalesce hunks before testing applicability

2018-09-13 Thread Phillip Wood
Hi Jochen On 03/09/2018 20:01, Jochen Sprickerhof wrote: > Hi Phillip, > > * Phillip Wood [2018-08-30 14:47]: >> When $newhunk is created it is marked as dirty to prevent >> coalesce_overlapping_hunks() from coalescing it. This patch does not >> change that. What is h

[PATCH 2/3] add read_author_script() to libgit

2018-09-12 Thread Phillip Wood
From: Phillip Wood Add read_author_script() to sequencer.c based on the implementation in builtin/am.c and update read_am_author_script() to use read_author_script(). The sequencer code that reads the author script will be updated in the next commit. Signed-off-by: Phillip Wood --- builtin

[PATCH 1/3] am: rename read_author_script()

2018-09-12 Thread Phillip Wood
From: Phillip Wood Rename read_author_script() in preparation for adding a shared read_author_script() function to libgit. Signed-off-by: Phillip Wood --- builtin/am.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builtin/am.c b/builtin/am.c index 5e866d17c7

[PATCH 3/3] sequencer: use read_author_script()

2018-09-12 Thread Phillip Wood
From: Phillip Wood Use the new function to read the author script, updating read_env_script() and read_author_ident(). This means we now have a single code path that reads the author script and uses sq_dequote() to dequote it. This fixes potential problems with user edited scripts as

[PATCH 0/3] am/rebase: share read_author_script()

2018-09-12 Thread Phillip Wood
From: Phillip Wood This is a follow up to pw/rebase-i-author-script-fix, it reduces code duplication and improves rebase's parsing of the author script. After this I'll do another series to share the code to write the author script. Phillip Wood (3): am: rename read_author_scri

Re: [PATCH] diff: fix --color-moved-ws=allow-indentation-change

2018-09-11 Thread Phillip Wood
On 04/09/2018 19:51, Phillip Wood wrote: > Hi Stefan > > On 04/09/2018 19:08, Stefan Beller wrote: >> On Tue, Sep 4, 2018 at 6:53 AM Phillip Wood >> wrote: >>> >>> From: Phillip Wood >>> >>> If there is more than one potential moved bl

Re: [PATCH] diff: fix --color-moved-ws=allow-indentation-change

2018-09-04 Thread Phillip Wood
Hi Stefan On 04/09/2018 19:08, Stefan Beller wrote: On Tue, Sep 4, 2018 at 6:53 AM Phillip Wood wrote: From: Phillip Wood If there is more than one potential moved block and the longest block is not the first element of the array of potential blocks then the block is cut short. With

[PATCH] diff: fix --color-moved-ws=allow-indentation-change

2018-09-04 Thread Phillip Wood
From: Phillip Wood If there is more than one potential moved block and the longest block is not the first element of the array of potential blocks then the block is cut short. With --color-moved=blocks this can leave moved lines unpainted if the shortened block does not meet the block length

Re: [PATCH] add -p: coalesce hunks before testing applicability

2018-08-30 Thread Phillip Wood
Dear Jochen/Junio On 28/08/18 19:07, Junio C Hamano wrote: Jochen Sprickerhof writes: When a hunk was split before being edited manually, it does not apply anymore cleanly. Apply coalesce_overlapping_hunks() first to make it work. Enable test for it as well. Signed-off-by: Jochen Sprickerhof

Re: Would a config var for --force-with-lease be useful?

2018-08-28 Thread Phillip Wood
Hi Johannes On 27/08/18 22:21, Johannes Schindelin wrote: Hi, On Sat, 25 Aug 2018, Constantin Weißer wrote: I think there are two aspects to using "force with lease". There is a third, very, very important aspect. When you use --force-with-lease (and I, for one, do, all the time), keep in

Re: Do not raise conflict when a code in a patch was already added

2018-08-20 Thread Phillip Wood
On 20/08/2018 11:22, Konstantin Kharlamov wrote: > So, steps-to-reproduce below rather full of trivia like setting up a > repo, but the TL;DR is: > > Upon using `git rebase -i HEAD~1` and then `git add -p` to add part of a > "hunk" as one commit, and then using `git rebase --continue` so the > oth

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

2018-08-20 Thread Phillip Wood
On 17/08/2018 23:44, Junio C Hamano wrote: > Here are the topics that have been cooking. Commits prefixed with > '-' are only in 'pu' (proposed updates) while commits prefixed with > '+' are in 'next'. The ones marked with '.' do not appear in any of > the integration branches, but I am still hol

Re: [GSoC][PATCH v6 15/20] rebase -i: rewrite write_basic_state() in C

2018-08-17 Thread Phillip Wood
On 10/08/2018 17:51, Alban Gruin wrote: > This rewrites write_basic_state() from git-rebase.sh in C. This is the > first step in the conversion of init_basic_state(), hence the mode in > rebase--helper.c is called INIT_BASIC_STATE. init_basic_state() will be > converted in the next commit. > > T

Re: [GSoC][PATCH v6 11/20] rebase -i: rewrite complete_action() in C

2018-08-17 Thread Phillip Wood
Hi Alban The interdiff from v5 to v6 looks good, I think the changes you have made the the other patches in this series are fine, I've just got a couple of small comments below about this one. Best Wishes Phillip On 10/08/2018 17:51, Alban Gruin wrote: > > This rewrites complete_action() from

Re: [PATCH] rebase -i: fix numbering in squash message

2018-08-15 Thread Phillip Wood
Hi Junio On 15/08/2018 19:05, Junio C Hamano wrote: > > Phillip Wood writes: > >> From: Phillip Wood >> >> Commit e12a7ef597 ("rebase -i: Handle "combination of commits" with >> GETTEXT_POISON", 2018-04-27) changed the way that indi

[PATCH] rebase -i: fix numbering in squash message

2018-08-15 Thread Phillip Wood
From: Phillip Wood Commit e12a7ef597 ("rebase -i: Handle "combination of commits" with GETTEXT_POISON", 2018-04-27) changed the way that individual commit messages are labelled when squashing commits together. In doing so a regression was introduced where the numbering of th

[PATCH 1/2] t3430: add conflicting commit

2018-08-15 Thread Phillip Wood
From: Phillip Wood Move the creation of conflicting-G from a test to the setup so that it can be used in subsequent tests without creating the kind of implicit dependencies that plague t3404. While we're at it simplify the arguments to the test_commit() call the creates the conflicting c

[PATCH 0/2] rebase -i: fix SIGSEGV when 'merge ' fails

2018-08-15 Thread Phillip Wood
From: Phillip Wood As they fix a bug these patches are based on maint. Unfortunately the second patch has semantic conflicts with master s/git_path_merge_msg()/git_path_merge_msg(the_repository)/ There are additional textual conflicts with pu/next due to some messages being marked for

[PATCH 2/2] rebase -i: fix SIGSEGV when 'merge ' fails

2018-08-15 Thread Phillip Wood
From: Phillip Wood If a merge command in the todo list specifies just a branch to merge with no -C/-c argument then item->commit is NULL. This means that if there are merge conflicts error_with_patch() is passed a NULL commit which causes a segmentation fault when make_patch() tries to look

Re: Bug? Git won't apply a split hunk that went through a text editor

2018-08-10 Thread Phillip Wood
Hi Philip Thanks for CC'ing me Peff. On 10/08/18 19:27, Jeff King wrote: On Thu, Aug 09, 2018 at 08:17:36PM -0700, Philip White wrote: I’d like to report what I suspect is a bug in Git, tested in 2.18 and 2.14. (I’d be delighted to be corrected if it is my own misunderstanding.) I’m reporting

Re: [GSoC][PATCH v5 04/20] rebase -i: rewrite the edit-todo functionality in C

2018-08-09 Thread Phillip Wood
Hi Alban On 09/08/18 16:35, Phillip Wood wrote: Hi Alban On 09/08/18 14:30, Alban Gruin wrote: 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

Re: [GSoC][PATCH v5 04/20] rebase -i: rewrite the edit-todo functionality in C

2018-08-09 Thread Phillip Wood
Hi Alban On 09/08/18 14:30, Alban Gruin wrote: 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_

Re: [GSoC][PATCH v5 11/20] rebase -i: rewrite complete_action() in C

2018-08-09 Thread Phillip Wood
Hi Alban Its nice to see things coming together so that the rebase happens in the same process as the some of the todo file preparation. I've ended up making quite a few comments on the new implementation, but they're all little things, the basic idea looks sound to me. On 31/07/18 18:59, Al

Re: [PATCH v4 2/2] sequencer: fix quoting in write_author_script

2018-08-09 Thread Phillip Wood
On 08/08/18 10:39, Eric Sunshine wrote: > On Tue, Aug 7, 2018 at 5:35 AM Phillip Wood wrote: >> Single quotes should be escaped as \' not \\'. The bad quoting breaks >> the interactive version of 'rebase --root' (which is used when there >> is no &

Re: [PATCH v4 2/2] sequencer: fix quoting in write_author_script

2018-08-09 Thread Phillip Wood
Hi Eric On 08/08/18 09:43, Eric Sunshine wrote: > On Tue, Aug 7, 2018 at 9:54 AM Phillip Wood wrote: >> On 07/08/18 11:23, Eric Sunshine wrote: >>> On Tue, Aug 7, 2018 at 5:35 AM Phillip Wood >>> wrote: >>>> + if (n > 0 && s[n] !=

Re: [PATCH v4 2/2] sequencer: fix quoting in write_author_script

2018-08-09 Thread Phillip Wood
Hi Junio On 08/08/18 17:01, Junio C Hamano wrote: > Eric Sunshine writes: > >> What does concern me is that read_env_script() doesn't seem to care >> about such a malformed file; it doesn't do any validation at all. >> Contrast that with read_author_ident() which is pretty strict about >> the con

Re: [PATCH v2 2/2] rebase --exec: make it work with --rebase-merges

2018-08-09 Thread Phillip Wood
On 09/08/18 10:22, Johannes Schindelin wrote: > Hi Phillip, > > On Mon, 6 Aug 2018, Phillip Wood wrote: > >> On 06/08/18 10:52, Johannes Schindelin via GitGitGadget wrote: >>> >>> From: Johannes Schindelin >>> >>> The idea of `--exec` is to

Re: [GSoC][PATCH v5 04/20] rebase -i: rewrite the edit-todo functionality in C

2018-08-08 Thread Phillip Wood
On 08/08/18 16:17, Alban Gruin wrote: 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 *todo

Re: [GSoC][PATCH v5 02/20] rebase -i: rewrite append_todo_help() in C

2018-08-08 Thread Phillip Wood
Hi Alban On 08/08/18 16:16, Alban Gruin wrote: 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 che

Re: [GSoC][PATCH v5 02/20] rebase -i: rewrite append_todo_help() in C

2018-08-07 Thread Phillip Wood
Hi Christian On 07/08/18 17:28, Christian Couder wrote: > On Tue, Aug 7, 2018 at 6:15 PM, Phillip Wood > wrote: >> On 07/08/18 16:25, Christian Couder wrote: >>> >>> I agree about checking the return value from fputs(), but it seems to >>> me that we

Re: [GSoC][PATCH v5 02/20] rebase -i: rewrite append_todo_help() in C

2018-08-07 Thread Phillip Wood
Hi Christian On 07/08/18 16:25, Christian Couder wrote: Hi Phillip, On Tue, Aug 7, 2018 at 3:57 PM, Phillip Wood wrote: On 31/07/18 18:59, Alban Gruin wrote: + + ret = fputs(buf.buf, todo); It is not worth changing the patch just for this but strbuf_write() might be clearer (you use

Re: [GSoC][PATCH v5 04/20] rebase -i: rewrite the edit-todo functionality in C

2018-08-07 Thread Phillip Wood
On 31/07/18 18:59, 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 the > `write-edit-todo` flag is removed, as the shell script does not need to > write the edit todo help message to the todo list a

Re: [GSoC][PATCH v5 02/20] rebase -i: rewrite append_todo_help() in C

2018-08-07 Thread Phillip Wood
Hi Alban On 31/07/18 18:59, Alban Gruin wrote: > This rewrites append_todo_help() from shell to C. It also incorporates > some parts of initiate_action() and complete_action() that also write > help texts to the todo file. > > This also introduces the source file rebase-interactive.c. This file >

Re: [PATCH v4 2/2] sequencer: fix quoting in write_author_script

2018-08-07 Thread Phillip Wood
Hi Eric On 07/08/18 11:23, Eric Sunshine wrote: > On Tue, Aug 7, 2018 at 5:35 AM Phillip Wood wrote: >> - Reverted the implementation to v2 with more robust detection of the >>missing "'" on the last line of the author script based on a >>

[PATCH v4 1/2] sequencer: handle errors from read_author_ident()

2018-08-07 Thread Phillip Wood
From: Phillip Wood Check for a NULL return value from read_author_ident() that indicates an error. Previously the NULL author was passed to commit_tree() which would then fallback to using the default author when creating the new commit. This changed the date and potentially the author of the

[PATCH v4 2/2] sequencer: fix quoting in write_author_script

2018-08-07 Thread Phillip Wood
From: Phillip Wood Single quotes should be escaped as \' not \\'. The bad quoting breaks the interactive version of 'rebase --root' (which is used when there is no '--onto' even if the user does not specify --interactive) for authors that contain "'"

[PATCH v4 0/2] fix author-script quoting

2018-08-07 Thread Phillip Wood
From: Phillip Wood I've updated these based on Eric's suggestions, hopefully they're good to go now. Thanks Eric for you help. Phillip Wood (2): sequencer: handle errors from read_author_ident() sequencer: fix quoting in write_author_script sequencer.c

Re: [PATCH v2 2/2] rebase --exec: make it work with --rebase-merges

2018-08-06 Thread Phillip Wood
On 06/08/18 16:23, Phillip Wood wrote: Hi Johannes On 06/08/18 10:52, Johannes Schindelin via GitGitGadget wrote: From: Johannes Schindelin The idea of `--exec` is to append an `exec` call after each `pick`. Since the introduction of fixup!/squash! commits, this idea was extended to apply

Re: [PATCH v2 2/2] rebase --exec: make it work with --rebase-merges

2018-08-06 Thread Phillip Wood
Hi Johannes On 06/08/18 10:52, Johannes Schindelin via GitGitGadget wrote: From: Johannes Schindelin The idea of `--exec` is to append an `exec` call after each `pick`. Since the introduction of fixup!/squash! commits, this idea was extended to apply to "pick, possibly followed by a fixup/squ

Re: [PATCH v3 2/2] sequencer: fix quoting in write_author_script

2018-08-03 Thread Phillip Wood
Hi Eric On 03/08/18 11:02, Eric Sunshine wrote: On Fri, Aug 3, 2018 at 5:33 AM Phillip Wood wrote: If there isn't some backward compatibility then if git gets upgraded while rebase is stopped then the author data will be silently corrupted if it contains "'". read_author_id

Re: [RFC PATCH v5 0/4] add -p: select individual hunk lines

2018-08-03 Thread Phillip Wood
Hi Ævar Thanks for looking at this. On 28/07/18 13:40, Ævar Arnfjörð Bjarmason wrote: > > On Thu, Jul 26 2018, Phillip Wood wrote: > >> Unfortuantely v4 had test failures due to a suprious brace from a last >> minute edit to a comment that I forgot to test. This vers

Re: [PATCH v3 2/2] sequencer: fix quoting in write_author_script

2018-08-03 Thread Phillip Wood
Dear Eric and Junio On 03/08/18 08:59, Eric Sunshine wrote: > On Thu, Aug 2, 2018 at 1:27 PM Junio C Hamano wrote: >> Phillip Wood writes: >>> For other interactive rebases this only affects external scripts that >>> read the author script and users whose git

[PATCH v3 1/2] sequencer: handle errors in read_author_ident()

2018-08-02 Thread Phillip Wood
From: Phillip Wood The calling code did not treat NULL as an error. Instead NULL caused it to fallback to using the default author when creating the new commit. This changed the date and potentially the author of the commit which corrupted the author data compared to its expected value. Fix this

[PATCH v3 2/2] sequencer: fix quoting in write_author_script

2018-08-02 Thread Phillip Wood
From: Phillip Wood Single quotes should be escaped as \' not \\'. The bad quoting breaks the interactive version of 'rebase --root' (which is used when there is no '--onto' even if the user does not specify --interactive) for authors that contain "'&q

[PATCH v3 0/2] Fix author script quoting

2018-08-02 Thread Phillip Wood
From: Phillip Wood Thanks to Eric for his comments on v2. The first patch hasn't changed much, the second one quite a bit. See the individual patches for a list of changes Phillip Wood (2): sequencer: handle errors in read_author_ident() sequencer: fix quoting in write_author_script

Re: [PATCH v2 2/2] sequencer: fix quoting in write_author_script

2018-08-01 Thread Phillip Wood
On 31/07/18 22:39, Eric Sunshine wrote: On Tue, Jul 31, 2018 at 7:15 AM Phillip Wood wrote: Single quotes should be escaped as \' not \\'. Note that this only affects authors that contain a single quote and then only external scripts that read the author script and users whose git i

Re: [PATCH v2 2/2] sequencer: fix quoting in write_author_script

2018-08-01 Thread Phillip Wood
Hi Eric On 31/07/18 22:39, Eric Sunshine wrote: On Tue, Jul 31, 2018 at 7:15 AM Phillip Wood wrote: Single quotes should be escaped as \' not \\'. Note that this only affects authors that contain a single quote and then only external scripts that read the author script and users wh

Re: [PATCH v2 1/2] sequencer: handle errors in read_author_ident()

2018-08-01 Thread Phillip Wood
Hi Eric Thanks for taking a look at this On 31/07/18 21:47, Eric Sunshine wrote: On Tue, Jul 31, 2018 at 7:15 AM Phillip Wood wrote: The calling code treated NULL as a valid return value, so fix this by returning and integer and passing in a parameter to receive the author. It might be

Re: [PATCH v2 0/4] fix "rebase -i --root" corrupting root commit

2018-07-31 Thread Phillip Wood
Hi Eric On 31/07/18 11:46, Eric Sunshine wrote: > On Tue, Jul 31, 2018 at 6:06 AM Phillip Wood > wrote: >> On 31/07/18 08:33, Eric Sunshine wrote: >>> Patch 2/4 of this series conflicts with Akinori MUSHA's >>> 'am/sequencer-author-script-fix' whi

[PATCH v2 1/2] sequencer: handle errors in read_author_ident()

2018-07-31 Thread Phillip Wood
From: Phillip Wood The calling code treated NULL as a valid return value, so fix this by returning and integer and passing in a parameter to receive the author. Signed-off-by: Phillip Wood --- sequencer.c | 49 ++--- 1 file changed, 26 insertions

<    1   2   3   4   5   6   7   8   9   10   >