[PATCH v5 7/9] sequencer: load commit related config

2017-12-11 Thread Phillip Wood
From: Phillip Wood Load default values for message cleanup, gpg signing of commits and basic diff configuration in preparation for committing without forking 'git commit'. Note that we interpret commit.cleanup=scissors to mean COMMIT_MSG_CLEANUP_SPACE to be consistent with 'gi

Re: [PATCH v5 7/9] sequencer: load commit related config

2017-12-11 Thread Phillip Wood
On 11/12/17 14:13, Phillip Wood wrote: > From: Phillip Wood > > Load default values for message cleanup, gpg signing of commits and > basic diff configuration in preparation for committing without forking > 'git commit'. Note that we interpret commit

Re: [PATCH v5 0/9] sequencer: don't fork git commit

2017-12-12 Thread Phillip Wood
On 11/12/17 23:44, Junio C Hamano wrote: > Phillip Wood writes: > >> From: Phillip Wood >> >> I've reworked the config handling since v4. It now stores the default >> values in struct replay_opt rather than using global variables and >> calls git_diff_b

[PATCH] sequencer: improve config handling

2017-12-13 Thread Phillip Wood
From: Phillip Wood The previous config handling relied on global variables, called git_default_config() even when the key had already been handled by git_sequencer_config() and did not initialize the diff configuration variables. Improve this by: i) loading the default values for message cleanup

Re: [PATCH v5 8/9] sequencer: try to commit without forking 'git commit'

2018-01-11 Thread Phillip Wood
On 10/01/18 22:40, Johannes Schindelin wrote: > Hi, > > On Wed, 10 Jan 2018, Jonathan Nieder wrote: > >> Phillip Wood wrote: >> >>> From: Phillip Wood >>> >>> If the commit message does not need to be edited then create the >>> comm

Re: [PATCH 1/8] sequencer: introduce new commands to resettherevision

2018-01-19 Thread Phillip Wood
On 18/01/18 15:35, Johannes Schindelin wrote: > > In the upcoming commits, we will teach the sequencer to recreate 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 br

[PATCH 2/2] sequencer: run 'prepare-commit-msg' hook

2018-01-19 Thread Phillip Wood
From: Phillip Wood Commit 356ee4659b ("sequencer: try to commit without forking 'git commit'", 2017-11-24) forgot to run the 'prepare-commit-msg' hook when creating the commit. Fix this by writing the commit message to a different file and running the hook. Using

[PATCH 0/2] sequencer: run 'prepare-commit-msg' hook

2018-01-19 Thread Phillip Wood
From: Phillip Wood These two patches add some tests and fix the sequencer to run the 'prepare-commit-msg' hook when committing without forking 'git commit' Phillip Wood (2): t7505: Add tests for cherry-pick and rebase -i/-p sequencer: run 'prepare-commit-msg

[PATCH 1/2] t7505: Add tests for cherry-pick and rebase -i/-p

2018-01-19 Thread Phillip Wood
From: Phillip Wood Check that cherry-pick and rebase call the 'prepare-commit-msg' hook correctly. The expected values for the hook arguments are taken to match the current master branch. I think there is scope for improving the arguments passed so they make a bit more sense - fo

Re: [PATCH 2/8] sequencer: introduce the `merge` command

2018-01-19 Thread Phillip Wood
On 18/01/18 15:35, 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 upstre

Re: [PATCH 3/8] sequencer: fast-forward merge commits, if possible

2018-01-19 Thread Phillip Wood
On 18/01/18 15:35, Johannes Schindelin wrote: > > Just like with regular `pick` commands, if we are trying to recreate a > merge commit, we now test whether the parents of said commit match HEAD > and the commits to be merged, and fast-forward if possible. > > This is not only faster, but also av

Re: [PATCH 1/8] sequencer: introduce new commands to resettherevision

2018-01-19 Thread Phillip Wood
On 19/01/18 12:24, Phillip Wood wrote: > > On 18/01/18 15:35, Johannes Schindelin wrote: >> >> Internally, the `label ` command creates the ref >> `refs/rewritten/`. This makes it possible to work with the labeled >> revisions interactively, or in a scripted fash

Re: [PATCH v3 1/9] rebase -i: generate the script via rebase--helper

2017-04-28 Thread Phillip Wood
On 26/04/17 12:59, Johannes Schindelin wrote: > The first step of an interactive rebase is to generate the so-called "todo > script", to be stored in the state directory as "git-rebase-todo" and to > be edited by the user. > > Originally, we adjusted the output of `git log ` using a simple > sed s

Re: [PATCH v3 1/9] rebase -i: generate the script via rebase--helper

2017-05-01 Thread Phillip Wood
On 28/04/17 20:22, Johannes Schindelin wrote: > Hi Philip, > > On Fri, 28 Apr 2017, Phillip Wood wrote: > >> On 26/04/17 12:59, Johannes Schindelin wrote: >> >>> The first step of an interactive rebase is to generate the so-called >>> "todo

[PATCH 0/2] Fix a couple of minor rebase -i regressions

2017-05-18 Thread Phillip Wood
From: Phillip Wood These patches fix a regression in the reflog message written when rebase -i finishes and supresses the status output from applying any autostashed changes to match the shell version of rebase -i. Phillip Wood (2): rebase -i: fix reflog message rebase -i: silence stash

[PATCH 1/2] rebase -i: fix reflog message

2017-05-18 Thread Phillip Wood
From: Phillip Wood When rebase -i was converted to C a bug was introduced into the code that creates the reflog message. Instead of saying rebase -i (finish): onto it says rebase -i (finish): onto as the strbuf is not reset between reading the value of and . Signed-off-by: Phillip Wood

[PATCH 2/2] rebase -i: silence stash apply

2017-05-18 Thread Phillip Wood
From: Phillip Wood The shell version of rebase -i silences the status output from 'git stash apply' when restoring the autostashed changes. The C version does not. Having the output from git stash apply on the screen is distracting as it makes it difficult to find the message from

[PATCH] rebase -i: Add missing newline to end of message

2017-05-18 Thread Phillip Wood
From: Phillip Wood The message that's printed when auto-stashed changes are successfully restored was missing '\n' at the end. --- sequencer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sequencer.c b/sequencer.c index 311728a14..4dcf9c8be 100644 --- a/se

Re: [PATCH 2/2] rebase -i: silence stash apply

2017-05-18 Thread Phillip Wood
Hi Johannes Thanks for your reply On 18/05/17 11:49, Johannes Schindelin wrote: Hi Phillip, On Thu, 18 May 2017, Phillip Wood wrote: diff --git a/sequencer.c b/sequencer.c index f8bc18badf1a3fb1b39656501c5a316e229968d2..311728a145dfc66e230334221a2610468239932d 100644 --- a/sequencer.c

Re: [PATCH] rebase -i: Add missing newline to end of message

2017-05-18 Thread Phillip Wood
On 18/05/17 14:48, Ævar Arnfjörð Bjarmason wrote: On Thu, May 18, 2017 at 3:41 PM, Phillip Wood wrote: From: Phillip Wood The message that's printed when auto-stashed changes are successfully restored was missing '\n' at the end. Both this and your reflog message really see

Re: [PATCH] rebase -i: Add missing newline to end of message

2017-05-19 Thread Phillip Wood
On 18/05/17 22:21, Johannes Schindelin wrote: > Hi Phillip, > > On Thu, 18 May 2017, Phillip Wood wrote: > >> From: Phillip Wood >> >> The message that's printed when auto-stashed changes are successfully >> restored was missing '\n' at the e

[PATCH v2] rebase -i: Add missing newline to end of message

2017-05-19 Thread phillip . wood
From: Phillip Wood The message that's printed when auto-stashed changes are successfully restored was missing '\n' at the end. Signed-off-by: Phillip Wood Acked-by: Johannes Schindelin --- I've added signed-off-by and acked-by lines to the commit message, otherwi

Re: [PATCH] rebase -i: Add missing newline to end of message

2017-05-19 Thread Phillip Wood
On 19/05/17 12:24, Ævar Arnfjörð Bjarmason wrote: On Fri, May 19, 2017 at 12:13 PM, Phillip Wood wrote: On 18/05/17 22:21, Johannes Schindelin wrote: Hi Phillip, On Thu, 18 May 2017, Phillip Wood wrote: From: Phillip Wood The message that's printed when auto-stashed change

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

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

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

[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

[PATCH 0/3] Add regression tests for recent rebase -i fixes

2017-05-31 Thread Phillip Wood
From: Phillip Wood These patches add some tests for the fixes I sent the week before last. The output tests check the messages for stashes that apply and fail for all three variants of rebase. They are quite strict but I couldn't think of a better way to check that the output is correc

[PATCH 1/3] rebase -i: Add test for reflog message

2017-05-31 Thread Phillip Wood
From: Phillip Wood Check that the reflog message written to the branch reflog when the rebase is completed is correct. This checks for regressions for the fix in commit 4ab867b8fc rebase -i: fix reflog message Signed-off-by: Phillip Wood --- t/t3404-rebase-interactive.sh | 7 +++ 1 file

[PATCH 2/3] rebase: Add tests for console output

2017-05-31 Thread Phillip Wood
From: Phillip Wood Check the console output when using --autostash and the stash applies cleanly is what we expect. To avoid this test depending on commit and stash hashes it uses sed to replace them with XXX. The sed script also replaces carriage returns in the output with '\r'

[PATCH 3/3] rebase: Add tests for console output with conflicting stash

2017-05-31 Thread Phillip Wood
From: Phillip Wood Check that the console output is what we expect when restoring autostashed changes fails. Signed-off-by: Phillip Wood --- t/t3420-rebase-autostash.sh | 10 +- t/t3420/expected-fail-am | 8 t/t3420/expected-fail-interactive | 6 ++ t

Re: [PATCH 2/3] rebase: Add tests for console output

2017-05-31 Thread Phillip Wood
On 31/05/17 11:42, Phillip Wood wrote: From: Phillip Wood Check the console output when using --autostash and the stash applies cleanly is what we expect. To avoid this test depending on commit and stash hashes it uses sed to replace them with XXX. The sed script also replaces carriage returns

Re: [PATCH 2/3] rebase: Add tests for console output

2017-06-07 Thread Phillip Wood
Hi Johannes Thanks for your feedback On 01/06/17 13:56, Johannes Schindelin wrote: > Hi Phillip, > > On Wed, 31 May 2017, Phillip Wood wrote: > >> From: Phillip Wood >> >> Check the console output when using --autostash and the stash applies >> cleanly i

Re: [PATCH 2/3] rebase: Add tests for console output

2017-06-14 Thread Phillip Wood
On 09/06/17 17:39, Junio C Hamano wrote: > Phillip Wood writes: > >> I'm confused by this as my script does not use the escape sequence "\r" >> out of portability concerns. It has a literal carriage return as you get >> from typing Ctrl-Q Ctrl-M in emacs or

[PATCH v2 3/3] rebase: Add more regression tests for console output

2017-06-14 Thread Phillip Wood
From: Phillip Wood Check the console output when using --autostash and the stash does not apply is what we expect. The test is quite strict but should catch any changes to the console output from the various rebase flavors. Thanks-to: Johannes Schindelin Signed-off-by: Phillip Wood --- t

[PATCH v2 2/3] rebase: Add regression tests for console output

2017-06-14 Thread Phillip Wood
From: Phillip Wood Check the console output when using --autostash and the stash applies cleanly is what we expect. The test is quite strict but should catch any changes to the console output from the various rebase flavors. Thanks-to: Johannes Schindelin Signed-off-by: Phillip Wood --- t

[PATCH v2 1/3] rebase -i: Add test for reflog message

2017-06-14 Thread Phillip Wood
From: Phillip Wood Check that the reflog message written to the branch reflog when the rebase is completed is correct Signed-off-by: Phillip Wood --- t/t3404-rebase-interactive.sh | 7 +++ 1 file changed, 7 insertions(+) diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase

[PATCH v2 0/3] Add regression tests for rectent rebase -i fixes

2017-06-14 Thread Phillip Wood
From: Phillip Wood I've revised the second two tests as Johannes suggested to drop the sed script. The first one is unchanged. Phillip Wood (3): rebase -i: Add test for reflog message rebase: Add regression tests for console output rebase: Add more regression tests for console outpu

Re: [PATCH v2 0/3] Add regression tests for rectent rebase -i fixes

2017-06-19 Thread Phillip Wood
On 16/06/17 14:49, Johannes Schindelin wrote: > Hi Junio, > > On Thu, 15 Jun 2017, Junio C Hamano wrote: > >> diff --git a/t/t3420-rebase-autostash.sh b/t/t3420-rebase-autostash.sh >> index 325ec75353..801bce25da 100755 >> --- a/t/t3420-rebase-autostash.sh >> +++ b/t/t3420-rebase-autostash.sh >>

Re: [PATCH v2 0/3] Add regression tests for rectent rebase -i fixes

2017-06-19 Thread Phillip Wood
On 16/06/17 00:29, Junio C Hamano wrote: > Junio C Hamano writes: > >> Junio C Hamano writes: >> >>> Phillip Wood writes: >>> >>>> From: Phillip Wood >>>> >>>> I've revised the second two tests as Johannes suggest

[PATCH v3 0/4] Add regression tests for recent rebase -i fixes

2017-06-19 Thread Phillip Wood
From: Phillip Wood I've updated the second two tests to be portable using q_to_cr() as Johannes suggested and added his patch to fix the autostash messages going to stdout rather than stderr. The reflog message test is unchanged. Thanks to Johannes for his help and to Junio for picking u

[PATCH v3 1/4] sequencer: print autostash messages to stderr

2017-06-19 Thread Phillip Wood
the autostash messages are printed to stdout instead. It is time to fix that: let's print the autostash messages to stderr instead of stdout. Signed-off-by: Johannes Schindelin Signed-off-by: Phillip Wood --- git-rebase.sh | 4 ++-- sequencer.c | 11 ++- 2 files chang

[PATCH v3 2/4] rebase -i: Add test for reflog message

2017-06-19 Thread Phillip Wood
From: Phillip Wood Check that the reflog message written to the branch reflog when the rebase is completed is correct Signed-off-by: Phillip Wood --- t/t3404-rebase-interactive.sh | 7 +++ 1 file changed, 7 insertions(+) diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase

[PATCH v3 3/4] rebase: Add regression tests for console output

2017-06-19 Thread Phillip Wood
From: Phillip Wood Check the console output when using --autostash and the stash applies cleanly is what we expect. The test is quite strict but should catch any changes to the console output from the various rebase flavors. Thanks-to: Johannes Schindelin Signed-off-by: Phillip Wood --- t

[PATCH v3 4/4] rebase: Add more regression tests for console output

2017-06-19 Thread Phillip Wood
From: Phillip Wood Check the console output when using --autostash and the stash does not apply is what we expect. The test is quite strict but should catch any changes to the console output from the various rebase flavors. Thanks-to: Johannes Schindelin Signed-off-by: Phillip Wood --- t

[PATCH 4/5] Add tests for Git::unquote_path()

2017-06-22 Thread Phillip Wood
From: Phillip Wood Check that unquote_path() handles spaces and escape sequences properly Signed-off-by: Phillip Wood --- t/t9700/test.pl | 7 +++ 1 file changed, 7 insertions(+) diff --git a/t/t9700/test.pl b/t/t9700/test.pl index 1b75c919651a8126e2a327f3d9645d4377823726

[PATCH 2/5] Git::unquote_path() Handle '\a'

2017-06-22 Thread Phillip Wood
From: Phillip Wood The version copied from git-add--interactive did not handle quoted paths containing '\a'. Signed-off-by: Phillip Wood --- perl/Git.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/perl/Git.pm b/perl/Gi

[PATCH 5/5] git-add--interactive.perl: Use unquote_path() from Git.pm

2017-06-22 Thread Phillip Wood
From: Phillip Wood Not that we've copied unquote_path() to Git.pm use that copy instead of our own. Signed-off-by: Phillip Wood --- git-add--interactive.perl | 43 +-- 1 file changed, 1 insertion(+), 42 deletions(-) diff --git a/gi

[PATCH 3/5] Git::unquote_path() throw an exception on bad path

2017-06-22 Thread Phillip Wood
From: Phillip Wood This is what the other routines in Git.pm do if there's an error. Signed-off-by: Phillip Wood --- perl/Git.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/perl/Git.pm b/perl/Git.pm index 889bf88cfcd34136e24e166fb3b72cced6d

[PATCH 1/5] Git.pm Add unquote_path()

2017-06-22 Thread Phillip Wood
From: Phillip Wood Add unquote_path() from git-add--interactive so it can be used by other scripts. Note this is a straight copy, it does not handle '\a'. That will be fixed in the next commit Signed-off-by: Phillip Wood --- perl/G

[PATCH 0/5] Move unquote_path() from git-add--interactive.perl to Git.pm

2017-06-22 Thread Phillip Wood
From: Phillip Wood I'm using this in some scripts and it would be more convenient to have it available from Git.pm rather than copying and pasting it each time I need it. I think it should be useful to other people using Git.pm as well. It is not uncommon to get a quoted path back from a co

Re: [PATCH v3 0/4] Add regression tests for recent rebase -i fixes

2017-06-23 Thread Phillip Wood
On 23/06/17 06:07, Junio C Hamano wrote: > Junio C Hamano writes: > >>> git-rebase.sh | 4 +- >>> sequencer.c | 11 ++-- >>> t/t3404-rebase-interactive.sh | 7 +++ >>> t/t3420-rebase-autostash.sh | 136 >>> -- >>>

Re: [PATCH v3 0/4] Add regression tests for recent rebase -i fixes

2017-06-26 Thread Phillip Wood
On 23/06/17 19:53, Junio C Hamano wrote: > Junio C Hamano writes: > >> 3404 needs a similar fix-up for the series to be able to stand on >> its own. Alternatively, at least we need to understand what in 'pu' >> makes the result of the merge pass---the symptom indicates that this >> topic cannot

Re: [PATCH v3 0/4] Add regression tests for recent rebase -i fixes

2017-06-26 Thread Phillip Wood
On 23/06/17 20:01, Junio C Hamano wrote: > Junio C Hamano writes: > >> For 3420, I can wrap the two-liner patch I showed here earlier into >> a commit on top of the series. > > So, here is what I'll queue on top before merging the topic down to > 'master'. Thanks for creating this fixup, I'll

[PATCH 3/4] Git::unquote_path() throw an exception on bad path

2017-06-30 Thread Phillip Wood
From: Phillip Wood This is what the other routines in Git.pm do if there's an error. Signed-off-by: Phillip Wood --- perl/Git.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/perl/Git.pm b/perl/Git.pm index f075b500c510d183074c0358fb24fefc722

[PATCH 1/4] add -i move unquote_path() to Git.pm

2017-06-30 Thread Phillip Wood
From: Phillip Wood Move unquote_path() from git-add--interactive to Git.pm so it can be used by other scripts. Note this is a straight copy, it does not handle '\a'. That will be fixed in the next commit. Signed-off-by: Phillip Wood --- git-add--interactive

[PATCH 2/4] Git::unquote_path() Handle '\a'

2017-06-30 Thread Phillip Wood
From: Phillip Wood The version copied from git-add--interactive did not handle quoted paths containing '\a'. Signed-off-by: Phillip Wood --- perl/Git.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/perl/Git.pm b/perl/Gi

[PATCH 4/4] Add tests for Git::unquote_path()

2017-06-30 Thread Phillip Wood
From: Phillip Wood Check that unquote_path() handles spaces and escape sequences properly Signed-off-by: Phillip Wood --- t/t9700/test.pl | 7 +++ 1 file changed, 7 insertions(+) diff --git a/t/t9700/test.pl b/t/t9700/test.pl index 1b75c919651a8126e2a327f3d9645d4377823726

[PATCH 0/4] Move unquote_path from git-add--interactive.perl to Git.pm

2017-06-30 Thread Phillip Wood
From: Phillip Wood Thanks for the review Junio, I've amended the patches as you suggested. The first patch now removes unquote_path() from add -i as well as adding it to Git.pm. I've fixed the naming issues (the version I sent previously was copied from another script rather than dir

Re: [PATCH 0/5] Move unquote_path() from git-add--interactive.perl to Git.pm

2017-06-30 Thread Phillip Wood
On 23/06/17 00:18, Jeff King wrote: > On Thu, Jun 22, 2017 at 11:26:17AM +0100, Phillip Wood wrote: > >> From: Phillip Wood >> >> I'm using this in some scripts and it would be more convenient to have >> it available from Git.pm rather than copying and pasting

[PATCH v2 1/2] t7505: Add tests for cherry-pick and rebase -i/-p

2018-01-23 Thread Phillip Wood
From: Phillip Wood Check that cherry-pick and rebase call the 'prepare-commit-msg' hook correctly. The expected values for the hook arguments are taken to match the current master branch. I think there is scope for improving the arguments passed so they make a bit more sense - fo

[PATCH v2 2/2] sequencer: run 'prepare-commit-msg' hook

2018-01-23 Thread Phillip Wood
From: Phillip Wood Commit 356ee4659b ("sequencer: try to commit without forking 'git commit'", 2017-11-24) forgot to run the 'prepare-commit-msg' hook when creating the commit. Fix this by writing the commit message to a different file and running the hook. Using

[PATCH v2 0/2] sequencer: run 'prepare-commit-msg' hook​

2018-01-23 Thread Phillip Wood
From: Phillip Wood I've updated the patches in response to comments, there are just a couple of small changes. Thanks to Ramsay and Eric for their reviews. Best Wishes Phillip Original cover letter: These two patches add some tests and fix the sequencer to run the 'prepare-commit

Re: [PATCH 3/8] sequencer: fast-forward merge commits, if possible

2018-01-24 Thread Phillip Wood
On 23/01/18 19:12, Junio C Hamano wrote: Phillip Wood writes: On 18/01/18 15:35, Johannes Schindelin wrote: Just like with regular `pick` commands, if we are trying to recreate a merge commit, we now test whether the parents of said commit match HEAD and the commits to be merged, and fast

[PATCH v3 0/3] sequencer: run 'prepare-commit-msg' hook

2018-01-24 Thread Phillip Wood
From: Phillip Wood The new test and the test hook scripts has been updated with some style fixes spotted by Junio. I've added an extra commit at the beginning to update the style of the original hook, so my later changes are clearer. Original cover letter: These two patches add some test

[PATCH v3 3/3] sequencer: run 'prepare-commit-msg' hook

2018-01-24 Thread Phillip Wood
From: Phillip Wood Commit 356ee4659b ("sequencer: try to commit without forking 'git commit'", 2017-11-24) forgot to run the 'prepare-commit-msg' hook when creating the commit. Fix this by writing the commit message to a different file and running the hook. Using

[PATCH v3 1/3] t7505: style fixes

2018-01-24 Thread Phillip Wood
From: Phillip Wood Fix the indentation and style of the hook script in preparation for further changes. Signed-off-by: Phillip Wood --- t/t7505-prepare-commit-msg-hook.sh | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/t/t7505-prepare-commit-msg-hook.sh b/t

[PATCH v3 2/3] t7505: Add tests for cherry-pick and rebase -i/-p

2018-01-24 Thread Phillip Wood
From: Phillip Wood Check that cherry-pick and rebase call the 'prepare-commit-msg' hook correctly. The expected values for the hook arguments are taken to match the current master branch. I think there is scope for improving the arguments passed so they make a bit more sense - fo

Re: [PATCH v3 3/3] sequencer: run 'prepare-commit-msg' hook

2018-01-25 Thread Phillip Wood
On 24/01/18 18:59, Junio C Hamano wrote: Ramsay Jones writes: On 24/01/18 12:34, Phillip Wood wrote: From: Phillip Wood Commit 356ee4659b ("sequencer: try to commit without forking 'git commit'", 2017-11-24) forgot to run the 'prepare-commit-msg' hook when cr

Re: [PATCH 2/2] rebase: add --show-patch

2018-01-26 Thread Phillip Wood
On 26/01/18 09:55, Nguyễn Thái Ngọc Duy wrote: > > It is useful to see the full patch while resolving conflicts in a > rebase. The only way to do it now is > > less .git/rebase-*/patch > > which could turn out to be a lot longer to type [1] if you are in a > linked worktree, or not at top-di

Re: [PATCH 2/2] rebase: add --show-patch

2018-01-30 Thread Phillip Wood
On 26/01/18 11:22, Duy Nguyen wrote: > On Fri, Jan 26, 2018 at 6:12 PM, Phillip Wood > wrote: >>> diff --git a/git-rebase--merge.sh b/git-rebase--merge.sh >>> index 06a4723d4d..5c513a9736 100644 >>> --- a/git-rebase--merge.sh >>> +++ b/git-reba

Re: [PATCH 2/8] sequencer: introduce the `merge` command

2018-01-31 Thread Phillip Wood
On 31/01/18 13:48, Johannes Schindelin wrote: > Hi Jake & Phillip, > > On Mon, 29 Jan 2018, Johannes Schindelin wrote: > >> On Sat, 20 Jan 2018, Jacob Keller wrote: >> >>> On Fri, Jan 19, 2018 at 6:45 AM, Phillip Wood >>> wrote: >

Re: [PATCH v2 02/10] sequencer: introduce new commands to reset therevision

2018-01-31 Thread Phillip Wood
On 31/01/18 13:21, Johannes Schindelin wrote: > > Hi Stefan, > > On Tue, 30 Jan 2018, Stefan Beller wrote: > >> On Mon, Jan 29, 2018 at 2:54 PM, Johannes Schindelin >> wrote: >>> @@ -116,6 +118,13 @@ static GIT_PATH_FUNC(rebase_path_stopped_sha, >>> "rebase-merge/stopped-sha") >>> static GIT_

Re: [PATCH v2 3/3] rebase: introduce and use pseudo-ref ORIG_COMMIT

2018-02-01 Thread Phillip Wood
On 31/01/18 09:30, Nguyễn Thái Ngọc Duy wrote: > > The new command `git rebase --show-current-patch` is useful for seeing > the commit related to the current rebase state. Some however may find > the "git show" command behind it too limiting. You may want to > increase context lines, do a diff tha

[PATCH 3/3] add -p: improve error messages

2018-02-13 Thread Phillip Wood
From: Phillip Wood If the user presses a key that isn't currently active then explain why it isn't active rather than just listing all the keys. It already did this for some keys, this patch does the same for the those that weren't already handled. Signed-off-by: Phillip Woo

<    2   3   4   5   6   7   8   9   10   >