[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

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

[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

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

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

[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

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 a

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] 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 suc

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 is

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 com

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

2018-11-21 Thread Phillip Wood
es to mercurial using commit obsolescence 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

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

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

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

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

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

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

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

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 a

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 sequencer_add_e

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 no

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 +++ b/builtin/add.c

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

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

[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

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

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

[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

[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

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

[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

[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

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

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

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

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

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

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

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

[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

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

Re: [PATCH] add -p: fix counting empty context lines in edited patches

2018-06-04 Thread Phillip Wood
On 01/06/18 21:03, Eric Sunshine wrote: > On Fri, Jun 1, 2018 at 1:46 PM, Phillip Wood > wrote: >> recount_edited_hunk() introduced in commit 2b8ea7f3c7 ("add -p: >> calculate offset delta for edited patches", 2018-03-05) required all >> context lines to start

Re: [PATCH] git-rebase.sh: handle keep-empty like all other options

2018-06-10 Thread Phillip Wood
Hi Elijah On 07/06/18 06:07, Elijah Newren wrote: Signed-off-by: Elijah Newren --- git-rebase.sh | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/git-rebase.sh b/git-rebase.sh index 40be59ecc4..a56b286372 100755 --- a/git-rebase.sh +++ b/git-rebase.sh @@ -276,6 +276,7

Re: [PATCH 2/2] git-rebase: error out when incompatible options passed

2018-06-10 Thread Phillip Wood
On 07/06/18 06:06, Elijah Newren wrote: git rebase has three different types: am, merge, and interactive, all of which are implemented in terms of separate scripts. am builds on git-am, merge builds on git-merge-recursive, and interactive builds on git-cherry-pick. We make use of features in th

[PATCH v2] add -p: fix counting empty context lines in edited patches

2018-06-11 Thread Phillip Wood
From: Phillip Wood recount_edited_hunk() introduced in commit 2b8ea7f3c7 ("add -p: calculate offset delta for edited patches", 2018-03-05) required all context lines to start with a space, empty lines are not counted. This was intended to avoid any recounting problems if the user had

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

2018-06-11 Thread Phillip Wood
Hi Elijah On 10/06/18 02:14, Elijah Newren wrote: > > Hi Dscho, > > On Sat, Jun 9, 2018 at 3:04 PM, Johannes Schindelin > wrote: >> On Thu, 7 Jun 2018, Elijah Newren wrote: >> >>> diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt >>> index 451252c173..28d1658d7a 100644 >>

Re: [PATCH] git-rebase.sh: handle keep-empty like all other options

2018-06-11 Thread Phillip Wood
Hi Elijah On 11/06/18 15:42, Elijah Newren wrote: Hi Phillip, On Sun, Jun 10, 2018 at 12:26 PM, Phillip Wood wrote: On 07/06/18 06:07, Elijah Newren wrote: Signed-off-by: Elijah Newren --- git-rebase.sh | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/git

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

2018-06-11 Thread Phillip Wood
Hi Alban, it's great to see you making progress with this. I don't want to add to your workload but a couple of things that might be nice to have in the future would be 1) avoid rewriting the todo list and running the editor if GIT_SEQUENCE_EDITOR is ':', especially when creating the todo lis

Re: [PATCH 2/2] git-rebase: error out when incompatible options passed

2018-06-11 Thread Phillip Wood
On 11/06/18 16:19, Elijah Newren wrote: Hi Phillip On Sun, Jun 10, 2018 at 12:40 PM, Phillip Wood wrote: Documentation/git-rebase.txt | 15 +-- git-rebase.sh | 17 + t/t3422-rebase-incompatible-options.sh | 10

Re: [PATCH 2/2] git-rebase: error out when incompatible options passed

2018-06-12 Thread Phillip Wood
On 11/06/18 16:49, Elijah Newren wrote: > Another thing I missed... > > On Sun, Jun 10, 2018 at 12:40 PM, Phillip Wood > wrote: >> On 07/06/18 06:06, Elijah Newren wrote: > >>> Some exceptions I left out: >>> >>>* --merge and --interac

Re: [PATCH] git-rebase.sh: handle keep-empty like all other options

2018-06-12 Thread Phillip Wood
On 11/06/18 17:08, Elijah Newren wrote: > Hi Phillip, > > On Mon, Jun 11, 2018 at 8:16 AM, Phillip Wood > wrote: >> On 11/06/18 15:42, Elijah Newren wrote: > >>> However, we have a bigger problem with empty commits, in that there >>>

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

2018-06-12 Thread Phillip Wood
Hi Alban On 12/06/18 13:33, Alban Gruin wrote: 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

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

2018-06-14 Thread Phillip Wood
Hi Alban On 13/06/18 16:22, Alban Gruin wrote: > This patch rewrites the edit-todo functionality from shell to C. This is > part of the effort to rewrite interactive rebase in C. > > Changes since v1: > > - Add a new function to launch the sequence editor, as advised by &

Re: [PATCH v2] sequencer: do not squash 'reword' commits when we hit conflicts

2018-06-17 Thread Phillip Wood
Hi Elijah, On 17/06/18 06:37, Elijah Newren wrote: Ever since commit 18633e1a22 ("rebase -i: use the rebase--helper builtin", 2017-02-09), when a commit marked as 'reword' in an interactive rebase has conflicts and fails to apply, when the rebase is resumed that commit will be squashed into its

Re: [RFC PATCH v2 7/7] git-rebase: make --allow-empty-message the default

2018-06-17 Thread Phillip Wood
Hi Elijah On 17/06/18 06:58, Elijah Newren wrote: am-based rebases already apply commits with an empty commit message without requiring the user to specify an extra flag. Make merge-based and interactive-based rebases behave the same. Signed-off-by: Elijah Newren --- Documentation/git-rebas

Re: [RFC PATCH v2 1/7] git-rebase.txt: document incompatible options

2018-06-17 Thread Phillip Wood
Hi Elijah On 17/06/18 06:58, Elijah Newren wrote: git rebase has many options that only work with one of its three backends. It also has a few other pairs of incompatible options. Document these. Signed-off-by: Elijah Newren --- Documentation/git-rebase.txt | 84 +

Re: [RFC PATCH v2 0/7] Document/fix/warn about rebase incompatibilities and inconsistences

2018-06-17 Thread Phillip Wood
Hi Elijah On 17/06/18 06:58, Elijah Newren wrote: git-rebase has lots of options that are mutually incompatible. Even among aspects of its behavior that is common to all rebase types, it has a number of inconsistencies. This series tries to document, fix, and/or warn users about many of these.

Re: [PATCH v2] sequencer: do not squash 'reword' commits when we hit conflicts

2018-06-18 Thread Phillip Wood
Hi Johannes On 17/06/18 20:28, Johannes Schindelin wrote: > Hi Phillip, > > On Sun, 17 Jun 2018, Phillip Wood wrote: > >> On 17/06/18 06:37, Elijah Newren wrote: >>> Ever since commit 18633e1a22 ("rebase -i: use the rebase--helper builtin", >>> 20

Re: [PATCH 1/2] rebase --root: demonstrate a bug while amending rootcommit messages

2018-06-18 Thread Phillip Wood
Hi Todd/Johannes On 15/06/18 05:31, Johannes Schindelin via GitGitGadget wrote: > > From: Todd Zullinger > > When splitting a repository, running `git rebase -i --root` to reword > the initial commit, Git dies with > > BUG: sequencer.c:795: root commit without message. > > Signed-off-by

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

2018-06-18 Thread Phillip Wood
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 command. This strbuf is printed only if the command fails. It is functionnaly similar to output() from git

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

2018-06-18 Thread Phillip Wood
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 the output of the checkout operation called by setup_reflog_action(). I'm having difficulty unders

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

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

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