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

2018-07-31 Thread Phillip Wood
From: Phillip Wood 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 is upgraded from the shell version of rebase -i while rebase was stoppe

[PATCH v2 0/2] Fix author script quoting

2018-07-31 Thread Phillip Wood
From: Phillip Wood These build on Eric's patches. The first patch would be better if it was integrated into Eric's patches. The second is a rebased version of my previous patch for fixing quoting in the author script with some additions by Johannes and rebased on top of Eric's fix

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

2018-07-31 Thread Phillip Wood
Hi Eric On 31/07/18 08:33, Eric Sunshine wrote: This is a re-roll of [1] which fixes sequencer bugs resulting in commit object corruption when "rebase -i --root" swaps in a new commit as root. Unfortunately, those bugs made it into v2.18.0 and have already corrupted at least one repository (a lo

Re: [PATCH v2 4/4] sequencer: don't die() on bogus user-edited timestamp

2018-07-31 Thread Phillip Wood
On 31/07/18 08:33, Eric Sunshine wrote: read_author_ident() is careful to handle errors "gently" when parsing "rebase-merge/author-script" by printing a suitable warning and returning NULL; it never die()'s. One possible reason that parsing might fail is that "rebase-merge/author-script" has been

Re: [PATCH v2 3/4] sequencer: fix "rebase -i --root" corrupting author header timestamp

2018-07-31 Thread Phillip Wood
On 31/07/18 08:33, Eric Sunshine wrote: When "git rebase -i --root" creates a new root commit, it corrupts the "author" header's timestamp by prepending a "@": author A U Thor @1112912773 -0700 The commit parser is very strict about the format of the "author" header, and does not allow a

Re: [PATCH v2 2/4] sequencer: fix "rebase -i --root" corrupting author header timezone

2018-07-31 Thread Phillip Wood
On 31/07/18 08:33, Eric Sunshine wrote: When "git rebase -i --root" creates a new root commit, it corrupts the "author" header's timezone by repeating the last digit: author A U Thor @1112912773 -07000 This is due to two bugs. First, write_author_script() neglects to add the closing quot

Re: [PATCH 2/2] sequencer: fix "rebase -i --root" corrupting author header timezone

2018-07-30 Thread Phillip Wood
Hi Eric On 30/07/18 10:29, Eric Sunshine wrote: > When "git rebase -i --root" creates a new root commit, it corrupts the > "author" header's timezone by repeating the last digit: > > author A U Thor @1112912773 -07000 > > This is due to two bugs. > > First, write_author_script() neglects to

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

2018-07-30 Thread Phillip Wood
On 30/07/18 10:29, Eric Sunshine wrote: > This series fixes bugs causing corruption of the root commit when > "rebase -i --root" is used to swap in a new root commit. In particular, > the "author" header has trailing garbage. Some tools handle the > corruption somewhat gracefully by showing a bogus

Re: [RFC PATCH] sequencer: fix quoting in write_author_script

2018-07-30 Thread Phillip Wood
On 27/07/18 13:37, Johannes Schindelin wrote: > Hi Phillip, Junio and Akinori, > > I just noticed that t3404 is broken without my patches (but with Junio's > fixup), on Windows, macOS and Linux. (See log at the end.) > > On Fri, 27 Jul 2018, Phillip Wood wrote: > >

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

2018-07-28 Thread Phillip Wood
On 27/07/18 19:27, Ævar Arnfjörð Bjarmason wrote: > > On Thu, Jul 26 2018, Phillip Wood wrote: > >> From: Phillip Wood >> >> Unfortuantely v4 had test failures due to a suprious brace from a last >> minute edit to a comment that I forgot to test. This version fi

Re: [RFC PATCH] sequencer: fix quoting in write_author_script

2018-07-27 Thread Phillip Wood
Hi Johannes On 26/07/18 13:33, Johannes Schindelin wrote: > Hi Phillip, > > On Wed, 18 Jul 2018, Phillip Wood wrote: > >> From: Phillip Wood >> >> Single quotes should be escaped as \' not \\'. Note that this only >> affects authors that contain a

Re: [RFC PATCH v5 2/4] add -p: select modified lines correctly

2018-07-27 Thread Phillip Wood
Hi Junio, thanks for the comments On 26/07/18 20:30, Junio C Hamano wrote: > Phillip Wood writes: > > An interesting problem you are solving ;-) > >> For example given the hunk >> 1 -* a longer description of the >> 2 - first item >>

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

2018-07-27 Thread Phillip Wood
On 26/07/18 20:36, Junio C Hamano wrote: > Phillip Wood writes: > >> +sub label_hunk_lines { >> +my $hunk = shift; >> +my $text = $hunk->{TEXT}; >> +my (@line_flags, @lines); >> +my ($block, $label, $last_mode) = (0, 0, ''); >

[PATCH v5 3/4] add -p: allow line selection to be inverted

2018-07-26 Thread Phillip Wood
From: Phillip Wood If the list of lines to be selected begins with '-' select all the lines except the ones listed. Signed-off-by: Phillip Wood --- Documentation/git-add.txt | 3 ++- git-add--interactive.perl | 19 +++ t/t3701-add-interactive.sh | 2 +- 3 files c

[PATCH v5 1/4] add -p: select individual hunk lines

2018-07-26 Thread Phillip Wood
From: Phillip Wood When I end up editing hunks it is almost always because I want to stage a subset of the lines in the hunk. Doing this by editing the hunk is inconvenient and error prone (especially so if the patch is going to be reversed before being applied). Instead offer an option for add

[PATCH v5 4/4] add -p: optimize line selection for short hunks

2018-07-26 Thread Phillip Wood
From: Phillip Wood If there are fewer than ten changes in a hunk then make spaces optional when selecting individual lines. This means that for short hunks one can just type 1-357 to stage lines 1, 2, 3, 5 & 7. Signed-off-by: Phillip Wood --- Documentation/git-add.txt | 9 + git

[RFC PATCH v5 2/4] add -p: select modified lines correctly

2018-07-26 Thread Phillip Wood
From: Phillip Wood When a set of lines is modified the hunk contains deletions followed by insertions. To correctly stage a subset of the modified lines we need to match up the selected deletions with the selected insertions otherwise we end up with deletions and context lines followed by

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

2018-07-26 Thread Phillip Wood
From: Phillip Wood Unfortuantely v4 had test failures due to a suprious brace from a last minute edit to a comment that I forgot to test. This version fixes that, my applogies for the patch churn. I've updated this series based on Ævar's feedback on v3 (to paraphrase stop using '

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

2018-07-26 Thread Phillip Wood
From: Phillip Wood I've updated this series based on Ævar's feedback on v3 (to paraphrase stop using '$_' so much and fix staging modified lines.). The first patch is functionally equivalent to the previous version but with a reworked implementation. Patch 2 is new, it

[RFC PATCH v4 2/4] add -p: select modified lines correctly

2018-07-26 Thread Phillip Wood
From: Phillip Wood When a set of lines is modified the hunk contains deletions followed by insertions. To correctly stage a subset of the modified lines we need to match up the selected deletions with the selected insertions otherwise we end up with deletions and context lines followed by

[PATCH v4 4/4] add -p: optimize line selection for short hunks

2018-07-26 Thread Phillip Wood
From: Phillip Wood If there are fewer than ten changes in a hunk then make spaces optional when selecting individual lines. This means that for short hunks one can just type 1-357 to stage lines 1, 2, 3, 5 & 7. Signed-off-by: Phillip Wood --- Documentation/git-add.txt | 9 + git

[PATCH v4 1/4] add -p: select individual hunk lines

2018-07-26 Thread Phillip Wood
From: Phillip Wood When I end up editing hunks it is almost always because I want to stage a subset of the lines in the hunk. Doing this by editing the hunk is inconvenient and error prone (especially so if the patch is going to be reversed before being applied). Instead offer an option for add

[PATCH v4 3/4] add -p: allow line selection to be inverted

2018-07-26 Thread Phillip Wood
From: Phillip Wood If the list of lines to be selected begins with '-' select all the lines except the ones listed. Signed-off-by: Phillip Wood --- Documentation/git-add.txt | 3 ++- git-add--interactive.perl | 19 +++ t/t3701-add-interactive.sh | 2 +- 3 files c

Re: [PATCH] sequencer.c: terminate the last line of author-script properly

2018-07-19 Thread Phillip Wood
Hi Junio On 18/07/18 18:17, Junio C Hamano wrote: > Phillip Wood writes: > >>> (I think we had code to do so in "git am" >>> that was rewritten in C first). >> >> The code in builtin/am.c doesn't try to write valid posix shell (if >> one

[RFC PATCH] sequencer: fix quoting in write_author_script

2018-07-18 Thread Phillip Wood
From: Phillip Wood 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 is upgraded from the shell version of rebase -i while rebase was stoppe

Re: [PATCH] sequencer.c: terminate the last line of author-scriptproperly

2018-07-18 Thread Phillip Wood
On 18/07/18 14:50, Phillip Wood wrote: Hi Akinori On 12/07/18 12:18, Akinori MUSHA wrote: It looks like write_author_script() intends to write out a file in Bourne shell syntax, but it doesn't put a closing single quote on the last line. This patch makes .git/rebase-merge/author-s

Re: [PATCH] sequencer.c: terminate the last line of author-script properly

2018-07-18 Thread Phillip Wood
Hi Akinori On 12/07/18 12:18, Akinori MUSHA wrote: It looks like write_author_script() intends to write out a file in Bourne shell syntax, but it doesn't put a closing single quote on the last line. This patch makes .git/rebase-merge/author-script actually parsable by sh(1) by adding a single q

Re: [PATCH] sequencer.c: terminate the last line of author-scriptproperly

2018-07-18 Thread Phillip Wood
On 18/07/18 10:45, Phillip Wood wrote: Hi Junio On 12/07/18 18:22, Junio C Hamano wrote: "Akinori MUSHA" writes: It looks like write_author_script() intends to write out a file in Bourne shell syntax, but it doesn't put a closing single quote on the last line. s/closi

Re: [PATCH] sequencer.c: terminate the last line of author-script properly

2018-07-18 Thread Phillip Wood
Hi Junio On 12/07/18 18:22, Junio C Hamano wrote: "Akinori MUSHA" writes: It looks like write_author_script() intends to write out a file in Bourne shell syntax, but it doesn't put a closing single quote on the last line. s/closing single quote/& and the terminating newline/? This patch

Re: [PATCH] sequencer.c: terminate the last line of author-script properly

2018-07-18 Thread Phillip Wood
Hi Akinori On 12/07/18 12:18, Akinori MUSHA wrote: It looks like write_author_script() intends to write out a file in Bourne shell syntax, but it doesn't put a closing single quote on the last line. This patch makes .git/rebase-merge/author-script actually parsable by sh(1) by adding a single

Re: [PATCH v5 0/9] Document/fix/warn about rebase incompatibilities and inconsistencies

2018-06-29 Thread Phillip Wood
Hi Elijah On 27/06/18 08:23, 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

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

2018-06-19 Thread Phillip Wood
From: Phillip Wood 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 parent wit

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

2018-06-19 Thread Phillip Wood
Hi Johannes On 18/06/18 22:42, Johannes Schindelin wrote: > > Hi Phillip, > > On Mon, 18 Jun 2018, Phillip Wood wrote: > >> On 17/06/18 20:28, Johannes Schindelin wrote: >>> >>> On Sun, 17 Jun 2018, Phillip Wood wrote: >>> >>>> On

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

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

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

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

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

2018-06-01 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: [GSoC][PATCH 0/2] rebase -i: rewrite append_todo_help() in C

2018-06-01 Thread Phillip Wood
On 31/05/18 19:44, Stefan Beller wrote: On Thu, May 31, 2018 at 10:48 AM, Phillip Wood wrote: Hi Alban, it's great to see you working on this On 31/05/18 12:01, Alban Gruin wrote: This series rewrites append_todo_help() from shell to C. This is part of the effort to rewrite intera

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

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

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

2018-05-31 Thread Phillip Wood
Hi Alban, it's great to see you working on this On 31/05/18 12:01, Alban Gruin wrote: > This series rewrites append_todo_help() from shell to C. This is part > of the effort to rewrite interactive rebase in C. > > The first commit rewrites append_todo_help() in C (the C version > covers a bit mor

Re: git rebase -i --exec and changing directory

2018-05-27 Thread Phillip Wood
Hi Ondrej On 27/05/18 13:53, Ondrej Mosnáček wrote: Hi Philip, 2018-05-27 14:28 GMT+02:00 Philip Oakley : You may need to give a bit more background of things that seem obvious to you. So where is the src directory you are cd'ing to relative to the directory/repository you are creating? It

Re: Regression in patch add?

2018-05-11 Thread Phillip Wood
On 11/05/18 03:47, Junio C Hamano wrote: > Phillip Wood writes: > >> Yes, I think it probably makes sense to do that. Originally I didn't >> count empty lines as context lines in case the user accidentally added >> some empty lines at the end of the hunk but if &#x

Re: Regression in patch add?

2018-05-10 Thread Phillip Wood
On 10/05/18 15:11, Oliver Joseph Ash wrote: > You found the problem Phillip! My editor was trimming trailing white space, > which breaks the context line. I'm glad we found the source of the problem (and that it wasn't some obscure bug) > I had tried to use an alternative editor to account for a

Re: Regression in patch add?

2018-05-10 Thread Phillip Wood
On 10/05/18 13:17, Martin Ågren wrote: > > On 10 May 2018 at 12:41, Oliver Joseph Ash wrote: >> I just ran into a similar problem: >> https://stackoverflow.com/questions/50258565/git-editing-hunks-fails-when-file-has-other-hunks >> >> I can reproduce on 2.17.0. The issue doesn't occur on 2.16.2,

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

2018-05-09 Thread Phillip Wood
On 06/05/18 18:50, Phillip Wood wrote: Hi Johannes, sorry it's taken me a while to look at this. I think it mostly makes sense to me, the code is well documented. I've got one comment below On 27/04/18 21:48, Johannes Schindelin wrote: During a series of fixup/squash commands, the i

Re: [PATCH v5 5/7] builtin/grep.c: add '--column' option to 'git-grep(1)'

2018-05-09 Thread Phillip Wood
Hi Taylor On 09/05/18 03:13, Taylor Blau wrote: Teach 'git-grep(1)' a new option, '--column', to show the column number of the first match on a non-context line. This makes it possible to teach 'contrib/git-jump/git-jump' how to seek to the first matching position of a grep match in your editor,

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

2018-05-06 Thread Phillip Wood
Hi Johannes, sorry it's taken me a while to look at this. I think it mostly makes sense to me, the code is well documented. I've got one comment below On 27/04/18 21:48, Johannes Schindelin wrote: > > During a series of fixup/squash commands, the interactive rebase builds > up a commit message wi

Re: [PATCH v4 5/7] builtin/grep.c: add '--column' option to 'git-grep(1)'

2018-05-06 Thread Phillip Wood
Hi Taylor On 05/05/18 03:43, Taylor Blau wrote: > > Teach 'git-grep(1)' a new option, '--column', to show the column > number of the first match on a non-context line. > > For example: > > $ git grep -n --column foo | head -n3 > .clang-format:51:14:# myFunction(foo, bar, baz); > .clang-fo

Re: [PATCH v3 0/4] rebase -i: avoid stale "# This is a combinationof" in commit messages

2018-04-26 Thread Phillip Wood
On 26/04/18 10:51, Johannes Schindelin wrote: > Hi Phillip, > > On Wed, 25 Apr 2018, Phillip Wood wrote: > >> On 25/04/18 13:48, Johannes Schindelin wrote: >>> >>> On Mon, 23 Apr 2018, Phillip Wood wrote: >>> >>>> On 23/04/18 19:11, Stefa

Re: [PATCH v3 0/4] rebase -i: avoid stale "# This is a combinationof" in commit messages

2018-04-25 Thread Phillip Wood
On 25/04/18 13:48, Johannes Schindelin wrote: Hi Phillip, On Mon, 23 Apr 2018, Phillip Wood wrote: On 23/04/18 19:11, Stefan Beller wrote: On Sat, Apr 21, 2018 at 12:34 AM, Johannes Schindelin wrote: Eric Sunshine pointed out that I had such a commit message in https://public-inbox.org

Re: [PATCH] git: add -N as a short option for --no-pager

2018-04-25 Thread Phillip Wood
On 24/04/18 17:59, Johannes Sixt wrote: In modern setups, less, the pager, uses alternate screen to show the content. When it is closed, it switches back to the original screen, and all content is gone. Are you setting LESS explicitly in the environment? From the git config man page: When the

Re: [PATCH v3 0/4] rebase -i: avoid stale "# This is a combinationof" in commit messages

2018-04-23 Thread Phillip Wood
On 23/04/18 19:11, Stefan Beller wrote: On Sat, Apr 21, 2018 at 12:34 AM, Johannes Schindelin wrote: Eric Sunshine pointed out that I had such a commit message in https://public-inbox.org/git/CAPig+cRrS0_nYJJY=o6cbov630snqhpv5qgrqdd8mw-syzn...@mail.gmail.com/ and I went on a hunt to figure out

Re: [PATCH v8 06/16] sequencer: introduce the `merge` command

2018-04-23 Thread Phillip Wood
On 23/04/18 13:20, Johannes Schindelin wrote: Hi Phillip, On Sat, 21 Apr 2018, Phillip Wood wrote: On 21/04/18 11:33, Johannes Schindelin wrote: This patch is part of the effort to reimplement `--preserve-merges` with a substantially improved design, a design that has been developed in the

Re: [PATCH v8 06/16] sequencer: introduce the `merge` command

2018-04-22 Thread Phillip Wood
On 21/04/18 16:56, Phillip Wood wrote: > On 21/04/18 11:33, Johannes Schindelin wrote: >> This patch is part of the effort to reimplement `--preserve-merges` with >> a substantially improved design, a design that has been developed in the >> Git for Windows project to m

Re: [PATCH v8 06/16] sequencer: introduce the `merge` command

2018-04-21 Thread Phillip Wood
On 21/04/18 11:33, Johannes Schindelin wrote: This patch is part of the effort to reimplement `--preserve-merges` with a substantially improved design, a design that has been developed in the Git for Windows project to maintain the dozens of Windows-specific patch series on top of upstream Git.

Re: [PATCH 3/3] rebase --skip: clean up commit message after a failedfixup/squash

2018-04-21 Thread Phillip Wood
On 20/04/18 13:18, Johannes Schindelin wrote: During a series of fixup/squash commands, the interactive rebase builds up a commit message with comments. This will be presented to the user in the editor if at least one of those commands was a `squash`. However, if the last of these fixup/squash

Re: [RFC PATCH] ident: don't cache default date

2018-04-20 Thread Phillip Wood
On 20/04/18 09:11, Johannes Schindelin wrote: > Hi Phillip, > > On Thu, 19 Apr 2018, Phillip Wood wrote: > >> On 18/04/18 19:15, Johannes Sixt wrote: >>> Am 18.04.2018 um 19:47 schrieb Phillip Wood: >>>> On 18/04/18 12:27, Ævar Arnfjörð Bjarmason wrote:

Re: [PATCH v7 06/17] sequencer: introduce new commands to reset the revision

2018-04-20 Thread Phillip Wood
On 19/04/18 13:20, Johannes Schindelin wrote: > In the upcoming commits, we will teach the sequencer to rebase merges. > This will be done in a very different way from the unfortunate design of > `git rebase --preserve-merges` (which does not allow for reordering > commits, or changing the branch t

Re: Bug: rebase -i creates committer time inversions on 'reword'

2018-04-19 Thread Phillip Wood
On 16/04/18 10:48, Phillip Wood wrote: > On 14/04/18 14:11, Johannes Schindelin wrote: >> Hi, >> >> On Sat, 14 Apr 2018, Phillip Wood wrote: >> >> FWIW I agree with Hannes' patch. >> >>> I think 'git am' probably gives all patche

Re: [RFC PATCH] ident: don't cache default date

2018-04-19 Thread Phillip Wood
On 18/04/18 19:15, Johannes Sixt wrote: > Am 18.04.2018 um 19:47 schrieb Phillip Wood: >> On 18/04/18 12:27, Ævar Arnfjörð Bjarmason wrote: >>> On Wed, Apr 18 2018, Phillip Wood wrote: >>>> From: Phillip Wood >>>> as it is created by running an separ

Re: [PATCH v6 05/15] sequencer: introduce the `merge` command

2018-04-18 Thread Phillip Wood
On 14/04/18 01:51, Johannes Schindelin wrote: > Hi Phillip, > > On Fri, 13 Apr 2018, Phillip Wood wrote: > >> On 13/04/18 11:12, Phillip Wood wrote: >>> @@ -3030,7 +3029,8 @@ static int pick_commits(struct todo_list *todo_list, >>> struct replay_opts *opts)

Re: [PATCH v6 04/15] sequencer: introduce new commands to reset the revision

2018-04-18 Thread Phillip Wood
On 15/04/18 18:17, Philip Oakley wrote: > From: "Phillip Wood" > : Friday, April 13, 2018 11:03 AM >> If a label or reset command fails it is likely to be due to a >> typo. Rescheduling the command would make it easier for the user to fix >> the problem as th

Re: [RFC PATCH] ident: don't cache default date

2018-04-18 Thread Phillip Wood
Hi Ævar, thanks for your comments On 18/04/18 12:27, Ævar Arnfjörð Bjarmason wrote: > > On Wed, Apr 18 2018, Phillip Wood wrote: > >> From: Phillip Wood >> >> Now that the sequencer commits without forking when the commit message >> isn't edited all the

[RFC PATCH] ident: don't cache default date

2018-04-18 Thread Phillip Wood
From: Phillip Wood Now that the sequencer commits without forking when the commit message isn't edited all the commits that are picked have the same committer date. If a commit is reworded it's committer date will be a later time as it is created by running an separate instance of &

Re: Bug: rebase -i creates committer time inversions on 'reword'

2018-04-18 Thread Phillip Wood
On 16/04/18 06:56, Johannes Sixt wrote: > > Am 15.04.2018 um 23:35 schrieb Junio C Hamano: >> Ah, do you mean we have an internal sequence like this, when "rebase >> --continue" wants to conclude an edit/reword? > > Yes, it's only 'reword' that is affected, because then subsequent picks > are pro

Re: Optimizing writes to unchanged files during merges?

2018-04-16 Thread Phillip Wood
'git mtimes restore'). The sentinels can be specified on the commandline when running 'git mtimes save' or stored in multiple mtimes.sentinal config keys. Best Wishes Phillip --->8--- #!/usr/bin/perl # Copyright (C) 2018 Phillip Wood # # git-mtimes.perl # # This program

Re: Regression in patch add?

2018-04-16 Thread Phillip Wood
On 15/04/18 14:59, Martin Ågren wrote: > Hi Mahmoud > > On 15 April 2018 at 14:21, wrote: >> I first run `git add -p`, then manually edit a chunk (after hitting `s` >> once, if it matters). The chunk originally contains the following: > > [...] > >> Under git 2.7.4, I can edit it to the follow

Re: Regression in patch add?

2018-04-16 Thread Phillip Wood
On 15/04/18 13:21, mqudsi wrote: > > Hello all, > > I'm currently running the latest version of git built from `master`, and > I'm running into what appears to be a regression in the behavior of the > piecewise `git add -p` when applying a manually edited chunk. > > I first run `git add -p`, the

Re: Bug: rebase -i creates committer time inversions on 'reword'

2018-04-16 Thread Phillip Wood
On 14/04/18 14:11, Johannes Schindelin wrote: > Hi, > > On Sat, 14 Apr 2018, Phillip Wood wrote: > >> On 13/04/18 17:52, Johannes Sixt wrote: >>> >>> I just noticed that all commits in a 70-commit branch have the same >>> committer timestamp. This i

Re: Bug: rebase -i creates committer time inversions on 'reword'

2018-04-14 Thread Phillip Wood
On 13/04/18 17:52, Johannes Sixt wrote: > > I just noticed that all commits in a 70-commit branch have the same > committer timestamp. This is very unusual on Windows, where rebase -i of > such a long branch takes more than one second (but not more than 3 or > so thanks to the builtin nature of t

Re: [PATCH v6 05/15] sequencer: introduce the `merge` command

2018-04-13 Thread Phillip Wood
On 13/04/18 11:12, Phillip Wood wrote: > On 10/04/18 13:29, Johannes Schindelin wrote: >> +static int do_merge(struct commit *commit, const char *arg, int arg_len, >> +int flags, struct replay_opts *opts) >> +{ >> +int run_commit_flags = (

Re: [PATCH v6 00/15] rebase -i: offer to recreate commit topology

2018-04-13 Thread Phillip Wood
On 12/04/18 23:02, Johannes Schindelin wrote: Hi Jake, On Thu, 12 Apr 2018, Jacob Keller wrote: On Wed, Apr 11, 2018 at 10:42 PM, Sergey Organov wrote: Jacob Keller writes: On Wed, Apr 11, 2018 at 6:13 AM, Sergey Organov wrote: It was rather --recreate-merges just a few weeks ago, and I

Re: [PATCH v6 15/15] rebase -i --rebase-merges: add a section to the man page

2018-04-13 Thread Phillip Wood
On 12/04/18 10:30, Johannes Schindelin wrote: Hi Phillip, On Wed, 11 Apr 2018, Phillip Wood wrote: On 10/04/18 13:30, Johannes Schindelin wrote: Firstly let me say that I think expanding the documentation and having an example is an excellent idea. Thanks! At first, I meant to leave this

Re: [PATCH v6 15/15] rebase -i --rebase-merges: add a section to the man page

2018-04-13 Thread Phillip Wood
On 11/04/18 20:10, Eric Sunshine wrote: On Wed, Apr 11, 2018 at 11:35 AM, Phillip Wood wrote: On 10/04/18 13:30, Johannes Schindelin wrote: +The `reset` command is essentially a `git reset --hard` to the specified +revision (typically a previously-labeled one). s/labeled/labelled

Re: [PATCH v6 05/15] sequencer: introduce the `merge` command

2018-04-13 Thread Phillip Wood
cts then ret == 0 rather than -1 > + > + if (active_cache_changed && > + write_locked_index(&the_index, &lock, COMMIT_LOCK)) { > + strbuf_release(&ref_name); > + return error(_("merge: Unable to write new index file&

Re: [PATCH v6 04/15] sequencer: introduce new commands to reset the revision

2018-04-13 Thread Phillip Wood
inked to the same repository. > > Signed-off-by: Johannes Schindelin If a label or reset command fails it is likely to be due to a typo. Rescheduling the command would make it easier for the user to fix the problem as they can just run 'git rebase --edit-todo'. It also ensures

Re: [PATCH v6 15/15] rebase -i --rebase-merges: add a section to the man page

2018-04-11 Thread Phillip Wood
On 10/04/18 13:30, Johannes Schindelin wrote: Firstly let me say that I think expanding the documentation and having an example is an excellent idea. + + +label onto + +# Branch: refactor-button +reset onto +pick 123456 Extract a generic Button class from the DownloadButton one +p

Re: What's cooking in git.git (Apr 2018, #01; Mon, 9)

2018-04-11 Thread Phillip Wood
On 09/04/18 11:21, Junio C Hamano wrote: * pw/add-p-select (2018-03-16) 3 commits (merged to 'next' on 2018-03-30 at eae69f5ded) + add -p: optimize line selection for short hunks + add -p: allow line selection to be inverted + add -p: select individual hunk lines "git add -p" interact

Re: [PATCH v3 0/3] add -p: select individual hunk lines

2018-04-02 Thread Phillip Wood
On 31/03/18 20:20, Ævar Arnfjörð Bjarmason wrote: > > On Fri, Mar 30 2018, Phillip Wood wrote: > >> On 29/03/18 19:32, Junio C Hamano wrote: >>> Phillip Wood writes: >>> >>>> From: Phillip Wood >>>> >>>> Since v2 I've

Re: [PATCH v2] add -p: fix 2.17.0-rc* regression due to moved code

2018-03-31 Thread Phillip Wood
On 31/03/18 13:50, Ævar Arnfjörð Bjarmason wrote: Fix a regression in 88f6ffc1c2 ("add -p: only bind search key if there's more than one hunk", 2018-02-13) which is present in 2.17.0-rc*, but not 2.16.0. In Perl, regex variables like $1 always refer to the last regex match. When the aforemention

Re: [PATCH v3 0/3] add -p: select individual hunk lines

2018-03-30 Thread Phillip Wood
On 29/03/18 19:32, Junio C Hamano wrote: > Phillip Wood writes: > >> From: Phillip Wood >> >> Since v2 I've updated the patches to use '-' instead of '^' to invert >> the selection to match the rest of add -i and clean -i. >> >>

Re: [PATCH 0/2] rebase --recreate-merges --keep-empty: don't prune empty

2018-03-22 Thread Phillip Wood
On 20/03/18 19:32, Junio C Hamano wrote: > Phillip Wood writes: > >> On 20/03/18 15:42, Johannes Schindelin wrote: >> ... >>> As indicated in another reply, I'd rather rebase the --recreate-merges >>> patches on top of your --keep-empty patch series. T

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