Re: A case where diff.colorMoved=plain is more sensible than diff.colorMoved=zebra & others

2018-12-06 Thread Phillip Wood
Hi Ævar On 06/12/2018 13:54, Ævar Arnfjörð Bjarmason wrote: Let's ignore how bad this patch is for git.git, and just focus on how diff.colorMoved treats it: diff --git a/builtin/add.c b/builtin/add.c index f65c172299..d1155322ef 100644 --- a/builtin/add.c +++

Re: [PATCH] rebase -i: introduce the 'test' command

2018-12-03 Thread Phillip Wood
On 01/12/2018 20:02, Jeff King wrote: On Thu, Nov 29, 2018 at 09:32:48AM +0100, Johannes Schindelin wrote: Would it not make more sense to add a command-line option (and a config setting) to re-schedule failed `exec` commands? Like so: Your proposition would do in most cases, however it is

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

2018-11-30 Thread Phillip Wood
Hi Alban Sorry it has taken me a while to look at the latest iteration. I like the changes to pass a list of strings for the exec commands. I've only had a chance to take a quick look, but I've got a couple of comments below On 09/11/2018 08:07, Alban Gruin wrote: This refactors

Re: [PATCH v2 0/9] diff --color-moved-ws fixes and enhancment

2018-11-27 Thread Phillip Wood
Hi Stefan On 26/11/2018 21:20, Stefan Beller wrote: On Fri, Nov 23, 2018 at 3:17 AM Phillip Wood wrote: From: Phillip Wood Thanks to Stefan for his feedback on v1. I've updated patches 2 & 8 in response to those comments - see the range-diff below for details (the patch numbers are

[PATCH v2 9/9] diff --color-moved-ws: handle blank lines

2018-11-23 Thread Phillip Wood
From: Phillip Wood When using --color-moved-ws=allow-indentation-change allow lines with the same indentation change to be grouped across blank lines. For now this only works if the blank lines have been moved as well, not for blocks that have just had their indentation changed. This completes

[PATCH v2 1/9] diff: document --no-color-moved

2018-11-23 Thread Phillip Wood
From: Phillip Wood Add documentation for --no-color-moved. Signed-off-by: Phillip Wood --- Documentation/diff-options.txt | 4 1 file changed, 4 insertions(+) diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt index 0378cd574e..151690f814 100644

[PATCH v2 2/9] Use "whitespace" consistently

2018-11-23 Thread Phillip Wood
From: Phillip Wood Most of the messages and documentation use 'whitespace' rather than 'white space' or 'white spaces' convert to latter two to the former for consistency. Signed-off-by: Phillip Wood --- Documentation/diff-options.txt | 4 ++-- Documentation/git-cat-file.txt | 8

[PATCH v2 3/9] diff: allow --no-color-moved-ws

2018-11-23 Thread Phillip Wood
From: Phillip Wood Allow --no-color-moved-ws and --color-moved-ws=no to cancel any previous --color-moved-ws option. Signed-off-by: Phillip Wood --- Documentation/diff-options.txt | 7 +++ diff.c | 6 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff

[PATCH v2 4/9] diff --color-moved-ws: demonstrate false positives

2018-11-23 Thread Phillip Wood
From: Phillip Wood 'diff --color-moved-ws=allow-indentation-change' can highlight lines that have internal whitespace changes rather than indentation changes. For example in commit 1a07e59c3e ("Update messages in preparation for i18n", 2018-07-21) the lines - die (_

[PATCH v2 7/9] diff --color-moved-ws: optimize allow-indentation-change

2018-11-23 Thread Phillip Wood
From: Phillip Wood When running git diff --color-moved-ws=allow-indentation-change v2.18.0 v2.19.0 cmp_in_block_with_wsd() is called 694908327 times. Of those 42.7% return after comparing a and b. By comparing the lengths first we can return early in all but 0.03% of those cases without

[PATCH v2 6/9] diff --color-moved=zebra: be stricter with color alternation

2018-11-23 Thread Phillip Wood
From: Phillip Wood Currently when using --color-moved=zebra the color of moved blocks depends on the number of lines separating them. This means that adding an odd number of unmoved lines between blocks that are already separated by one or more unmoved lines will change the color of subsequent

[PATCH v2 0/9] diff --color-moved-ws fixes and enhancment

2018-11-23 Thread Phillip Wood
From: Phillip Wood Thanks to Stefan for his feedback on v1. I've updated patches 2 & 8 in response to those comments - see the range-diff below for details (the patch numbers are off by one in the range diff, I think because the first patch is unchanged and so it was used as the merge

[PATCH v2 5/9] diff --color-moved-ws: fix false positives

2018-11-23 Thread Phillip Wood
From: Phillip Wood 'diff --color-moved-ws=allow-indentation-change' can color lines as moved when they are in fact different. For example in commit 1a07e59c3e ("Update messages in preparation for i18n", 2018-07-21) the lines - die (_("must end with a color"));

[PATCH v2 8/9] diff --color-moved-ws: modify allow-indentation-change

2018-11-23 Thread Phillip Wood
From: Phillip Wood Currently diff --color-moved-ws=allow-indentation-change does not support indentation that contains a mix of tabs and spaces. For example in commit 546f70f377 ("convert.h: drop 'extern' from function declaration", 2018-06-30) the function parameters in the follo

Re: [PATCH v1 9/9] diff --color-moved-ws: handle blank lines

2018-11-21 Thread Phillip Wood
On 20/11/2018 18:05, Stefan Beller wrote: On Fri, Nov 16, 2018 at 3:04 AM Phillip Wood wrote: From: Phillip Wood When using --color-moved-ws=allow-indentation-change allow lines with the same indentation change to be grouped across blank lines. For now this only works if the blank lines

Re: [PATCH] technical doc: add a design doc for the evolve command

2018-11-21 Thread Phillip Wood
bsolescence information in rebase and pull I'll reply.) > If you create a merge and then amend one of its > parent commits, the evolve command will need to rebase the merge and > point one or both parents to the replacement instead. > > - Stefan > On Tue, Nov 20, 2018 at 5:03 A

Re: [PATCH] technical doc: add a design doc for the evolve command

2018-11-20 Thread Phillip Wood
On 15/11/2018 00:55, sxe...@google.com wrote: From: Stefan Xenos +Obsolescence across cherry-picks + +By default the evolve command will treat cherry-picks and squash merges as being +completely separate from the original. Further amendments to the original

Re: [PATCH] technical doc: add a design doc for the evolve command

2018-11-20 Thread Phillip Wood
On 20/11/2018 12:18, Phillip Wood wrote: On 15/11/2018 00:55, sxe...@google.com wrote: From: Stefan Xenos +Divergence +-- +From the user’s perspective, two changes are divergent if they both ask for +different replacements to the same commit. More precisely, a target commit

Re: [PATCH] technical doc: add a design doc for the evolve command

2018-11-20 Thread Phillip Wood
Hi Stefan Thanks for working on this, I think it could be a really useful addition to git. I'd echo Gábor's comments about making commands descriptive and easy for the user to find, git has aliases, accepts abbreviated option names and has shell completion so I don't think typing is really

Re: [PATCH v1 8/9] diff --color-moved-ws: modify allow-indentation-change

2018-11-17 Thread Phillip Wood
Hi Stefan On 16/11/2018 21:47, Stefan Beller wrote: On Fri, Nov 16, 2018 at 3:04 AM Phillip Wood wrote: From: Phillip Wood Currently diff --color-moved-ws=allow-indentation-change does not support indentation that contains a mix of tabs and spaces. For example in commit 546f70f377

Re: [PATCH v1 7/9] diff --color-moved-ws: optimize allow-indentation-change

2018-11-17 Thread Phillip Wood
On 16/11/2018 20:40, Stefan Beller wrote: On Fri, Nov 16, 2018 at 3:04 AM Phillip Wood wrote: From: Phillip Wood When running git diff --color-moved-ws=allow-indentation-change v2.18.0 v2.19.0 cmp_in_block_with_wsd() is called 694908327 times. Of those 42.7% return after comparing

[PATCH v1 1/9] diff: document --no-color-moved

2018-11-16 Thread Phillip Wood
From: Phillip Wood Add documentation for --no-color-moved. Signed-off-by: Phillip Wood --- Documentation/diff-options.txt | 4 1 file changed, 4 insertions(+) diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt index 0378cd574e..151690f814 100644

[PATCH v1 4/9] diff --color-moved-ws: demonstrate false positives

2018-11-16 Thread Phillip Wood
From: Phillip Wood 'diff --color-moved-ws=allow-indentation-change' can highlight lines that have internal whitespace changes rather than indentation changes. For example in commit 1a07e59c3e ("Update messages in preparation for i18n", 2018-07-21) the lines - die (_

[PATCH v1 3/9] diff: allow --no-color-moved-ws

2018-11-16 Thread Phillip Wood
From: Phillip Wood Allow --no-color-moved-ws and --color-moved-ws=no to cancel any previous --color-moved-ws option. Signed-off-by: Phillip Wood --- Documentation/diff-options.txt | 7 +++ diff.c | 6 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff

[PATCH v1 2/9] diff: use whitespace consistently

2018-11-16 Thread Phillip Wood
From: Phillip Wood Most of the documentation uses 'whitespace' rather than 'white space' or 'white spaces' convert to latter two to the former for consistency. Signed-off-by: Phillip Wood --- Documentation/diff-options.txt | 4 ++-- diff.c | 2 +- 2 files changed, 3

[PATCH v1 8/9] diff --color-moved-ws: modify allow-indentation-change

2018-11-16 Thread Phillip Wood
From: Phillip Wood Currently diff --color-moved-ws=allow-indentation-change does not support indentation that contains a mix of tabs and spaces. For example in commit 546f70f377 ("convert.h: drop 'extern' from function declaration", 2018-06-30) the function parameters in the follo

[PATCH v1 0/9] diff --color-moved-ws fixes and enhancment

2018-11-16 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 reworks it so that it does. Since the rfc this series has grown a few fixes at the beginning

[PATCH v1 5/9] diff --color-moved-ws: fix false positives

2018-11-16 Thread Phillip Wood
From: Phillip Wood 'diff --color-moved-ws=allow-indentation-change' can color lines as moved when they are in fact different. For example in commit 1a07e59c3e ("Update messages in preparation for i18n", 2018-07-21) the lines - die (_("must end with a color"));

[PATCH v1 9/9] diff --color-moved-ws: handle blank lines

2018-11-16 Thread Phillip Wood
From: Phillip Wood When using --color-moved-ws=allow-indentation-change allow lines with the same indentation change to be grouped across blank lines. For now this only works if the blank lines have been moved as well, not for blocks that have just had their indentation changed. This completes

[PATCH v1 6/9] diff --color-moved=zebra: be stricter with color alternation

2018-11-16 Thread Phillip Wood
From: Phillip Wood Currently when using --color-moved=zebra the color of moved blocks depends on the number of lines separating them. This means that adding an odd number of unmoved lines between blocks that are already separated by one or more unmoved lines will change the color of subsequent

[PATCH v1 7/9] diff --color-moved-ws: optimize allow-indentation-change

2018-11-16 Thread Phillip Wood
From: Phillip Wood When running git diff --color-moved-ws=allow-indentation-change v2.18.0 v2.19.0 cmp_in_block_with_wsd() is called 694908327 times. Of those 42.7% return after comparing a and b. By comparing the lengths first we can return early in all but 0.03% of those cases without

Re: [PATCH v2 2/2] rebase: validate -C and --whitespace= parameters early

2018-11-14 Thread Phillip Wood
Hi Johannes Thanks for doing this, I think this patch is good. I've not checked the first patch as I think it is the same as before judging from the covering letter. Best Wishes Phillip On 14/11/2018 16:25, Johannes Schindelin via GitGitGadget wrote: From: Johannes Schindelin It is a

Re: [PATCH 1/1] rebase: really just passthru the `git am` options

2018-11-13 Thread Phillip Wood
Hi Johannes On 13/11/2018 19:21, Johannes Schindelin wrote: Hi Phillip, On Tue, 13 Nov 2018, Phillip Wood wrote: Thanks for looking at this. Unfortunately using OPT_PASSTHRU_ARGV seems to break the error reporting Running bin/wrappers/git rebase --onto @ @^^ -Cbad Gives git

Re: [PATCH 1/1] rebase: really just passthru the `git am` options

2018-11-13 Thread Phillip Wood
mentored Pratik to implement these options): OPT_PASSTHRU_ARGV. It is intended for exactly this use case, where command-line options want to be parsed into a separate `argv_array`. Let's use this feature. Incidentally, this also allows us to address a bug discovered by Phillip Wood, where

Regression: rebase -C1 fails in master

2018-11-12 Thread Phillip Wood
I've just tried running bin-wrappers/git rebase -C1 @^ and I get error: unknown switch `1' usage: git rebase [-i] [options] [--exec ] [--onto ] [] [] or: git rebase [-i] [options] [--exec ] [--onto ] --root [] or: git rebase --continue | --abort | --skip | --edit-todo ...

Re: [PATCH v2 2/2] rebase: Implement --merge via git-rebase--interactive

2018-11-12 Thread Phillip Wood
Hi Elijah It's good to see these patches progressing, I've just got a couple of comments related to Johannes' points below On 12/11/2018 16:21, Johannes Schindelin wrote: > Hi Elijah, > > On Wed, 7 Nov 2018, Elijah Newren wrote: > >> Interactive rebases are implemented in terms of cherry-pick

Re: What's cooking in git.git (Nov 2018, #03; Wed, 7)

2018-11-08 Thread Phillip Wood
On 07/11/2018 09:41, 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

Re: [PATCH/RFC] sequencer.c: record revert/cherry-pick commit with trailer lines

2018-11-04 Thread Phillip Wood
Hi Duy On 04/11/2018 17:41, Duy Nguyen wrote: On Sun, Nov 4, 2018 at 5:45 PM Phillip Wood wrote: On 04/11/2018 07:22, Nguyễn Thái Ngọc Duy wrote: When a commit is reverted (or cherry-picked with -x) we add an English sentence recording that commit id in the new commit message. Make

Re: [PATCH/RFC] sequencer.c: record revert/cherry-pick commit with trailer lines

2018-11-04 Thread Phillip Wood
On 04/11/2018 07:22, Nguyễn Thái Ngọc Duy wrote: When a commit is reverted (or cherry-picked with -x) we add an English sentence recording that commit id in the new commit message. Make these real trailer lines instead so that they are more friendly to parsers (especially "git

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

2018-11-02 Thread Phillip Wood
Hi Alban On 02/11/2018 16:26, Alban Gruin wrote: Hi Phillip, Le 02/11/2018 à 11:09, Phillip Wood a écrit : +    struct todo_item *items = NULL, +    base_item = {TODO_EXEC, NULL, 0, 0, commands_len, 0}; + +    strbuf_addstr(buf, commands); +    base_item.offset_in_buf = buf->

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

2018-11-02 Thread Phillip Wood
Hi Alban On 01/11/2018 23:31, Alban Gruin wrote: > Le 30/10/2018 à 17:47, Phillip Wood a écrit : >> On 27/10/2018 22:29, Alban Gruin wrote: >>> This refactors sequencer_add_exec_commands() to work on a todo_list to >>> avoid redundant reads and writes to the disk. &

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

2018-11-01 Thread Phillip Wood
Hi Junio On 01/11/2018 03:01, Junio C Hamano wrote: Phillip Wood writes: From: Phillip Wood Sorry for the confusion with v3, here are the updated patches. Thanks to Junio for the feedback on v2. I've updated patch 4 based on those comments, the rest are unchanged. The mistake

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

2018-10-31 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 v4 0/5] am/rebase: share read_author_script()

2018-10-31 Thread Phillip Wood
From: Phillip Wood Sorry for the confusion with v3, here are the updated patches. 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

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

2018-10-31 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 v4 1/5] am: don't die in read_author_script()

2018-10-31 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 v4 5/5] sequencer: use read_author_script()

2018-10-31 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

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

2018-10-31 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

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

2018-10-31 Thread Phillip Wood
On 31/10/2018 02:50, Junio C Hamano wrote: > Phillip Wood writes: > >> From: Phillip Wood >> >> Thanks to Junio for the feedback on v2. I've updated patch 4 based on >> those comments, the rest are unchanged. > > Hmph, all these five patches seem to be iden

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

2018-10-30 Thread Phillip Wood
On 27/10/2018 22:29, Alban Gruin wrote: This refactors sequencer_add_exec_commands() to work on a todo_list to avoid redundant reads and writes to the disk. An obvious way to do this would be to insert the `exec' command between the other commands, and reparse it once this is done. This is not

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

[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

[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. After

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

[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 those (t

[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

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 Schinde

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 prefixed with >>&

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()

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

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

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

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

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

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

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

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 that hav

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 wrote: During

[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 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 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 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 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(+), 1 deletion

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 sense, >

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 --- a/diff.c

[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 >

[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 proceed

[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

  1   2   3   4   5   6   >