Bug? git rebase -i --autostash fails to restore working files

2016-07-28 Thread Phillip Wood
When running ‘git rebase -i --autostash’ if the editor fails then the rebase fails but stash is not applied so the working files are not restored. Running ‘git rebase --abort’ replies that there’s no rebase in progress. If you notice what’s happened it’s not a problem if you know to do ‘git stash

Re: Bug? git rebase -i --autostash fails to restore working files

2016-07-28 Thread Phillip Wood
On 28/07/16 14:02, Remi Galan Alfonso wrote: > Hi Phillip, > > Phillip Wood <phillip.w...@talktalk.net> writes: >> When running ‘git rebase -i --autostash’ if the editor fails then the >> rebase fails but stash is not applied so the working files are not >> rest

[PATCH 4/6] t3504: use test_commit

2017-08-02 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> Using test_commit is simpler than chaining echo && git add && test_tick && commit. Also having tags makes it clearer which commit is being selecting by reset. Signed-off-by: Phillip Wood <phillip.w...@dunelm

[PATCH 5/6] cherry-pick/revert: remember --rerere-autoupdate

2017-08-02 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> When continuing after conflicts, cherry-pick forgot if the user had specified '--rerere-autoupdate'. Redo the cherry-pick rerere tests to check --rerere-autoupdate works as expected. Signed-off-by: Phillip Wood <phillip.w...@dune

[PATCH 3/6] rebase -i: honor --rerere-autoupdate

2017-08-02 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> Interactive rebase was ignoring '--rerere-autoupdate'. Fix this by reading it appropriate file when restoring the sequencer state for an interactive rebase and passing '--rerere-autoupdate' to merge and cherry-pick when rebasing with '--pr

[PATCH 6/6] cherry-pick/revert: reject --rerere-autoupdate when continuing

2017-08-02 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> cherry-pick and revert should not accept --[no-]rerere-autoupdate once they have started. Signed-off-by: Phillip Wood <phillip.w...@dunelm.org.uk> --- This will break scripts that pass --[no-]rerere-autoupdate to 'git cherry-pick --

[PATCH 1/6] am: remember --rerere-autoupdate setting

2017-08-02 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> Save the rerere-autoupdate setting so that it is remembered after stopping for the user to resolve conflicts. Signed-off-by: Phillip Wood <phillip.w...@dunelm.org.uk> --- There are no new tests, but this code is exercised by the new

[PATCH 0/6] am/cherry-pick/rebase/revert --rerere-autoupdate fixes

2017-08-02 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> With the exception of 'rebase -m' when continuing after stopping for the user to resolve conflicts, they all forget the setting of --rerere-autoupdate. Phillip Wood (6): am: remember --rerere-autoupdate setting rebase: honor --rerere-auto

[PATCH 2/6] rebase: honor --rerere-autoupdate

2017-08-02 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> Rebase accepts '--rerere-autoupdate' as an option but only honors it if '-m' is also given. Fix it for a non-interactive rebase by passing on the option to 'git am' and 'git cherry-pick'. Rework the tests so that they can be used for each

Re: [PATCH 6/6] cherry-pick/revert: reject --rerere-autoupdate when continuing

2017-08-03 Thread Phillip Wood
Hi Junio Thanks for your comments. On 02/08/17 23:29, Junio C Hamano wrote: > Junio C Hamano <gits...@pobox.com> writes: > >> Phillip Wood <phillip.w...@talktalk.net> writes: >> >>> From: Phillip Wood <phillip.w...@dunelm.org.uk> >>> >

[PATCH v3] am: fix signoff when other trailers are present

2017-08-12 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> If there was no 'Signed-off-by:' trailer but another trailer such as 'Reported-by:' then 'git am --signoff' would add a blank line between the existing trailers and the added 'Signed-off-by:' line. e.g. Rebase accepts '--rerere-auto

Re: [RFC PATCH 0/5] Add option to autostage changes when continuing a rebase

2017-07-27 Thread Phillip Wood
On 27/07/17 11:36, Phillip Wood wrote: On 26/07/17 23:12, Junio C Hamano wrote: Junio C Hamano <gits...@pobox.com> writes: Hmph, this is interesting. "git rebase" does take "--rerere-autoupdate" option from the command line, and propagates it to a later invoca

Re: [RFC PATCH 0/5] Add option to autostage changes when continuing a rebase

2017-07-27 Thread Phillip Wood
On 26/07/17 23:12, Junio C Hamano wrote: > Junio C Hamano writes: > >> Hmph, this is interesting. >> >> "git rebase" does take "--rerere-autoupdate" option from the command >> line, and propagates it to a later invocation of "rebase --continue" >> by storing the value to

[RFC PATCH 1/5] rebase --continue: add --autostage to stage unstaged changes

2017-07-26 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> After resolving conflicts during a rebase it is a pain to have to run 'git add' before 'git rebase --continue'. Passing --autostage to 'git rebase --continue' will stage them automatically so long as 'git diff --check' says they

[RFC PATCH 3/5] Unify rebase amend message when HEAD has changed

2017-07-26 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> If rebase --interactive is unable to commit staged changes because HEAD has changed since rebase stopped the user gets different messages depending on whether they specified --autostage or not. Update the messages in the other code paths to

[RFC PATCH 0/5] Add option to autostage changes when continuing a rebase

2017-07-26 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> These patches add an '--autostage' option (and corresponding config variable) to 'rebase --continue' that will stage any unstaged changes before continuing. This saves the user having to type 'git add' before running 'git rebase --co

[RFC PATCH 5/5] Add rebase.continue.autostage config setting

2017-07-26 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> This enables the user to always specify --autostage with --continue The tests check that setting rebase.continue.autostage=true results in 'git rebase --continue' autostaging unstaged changes and that '--no-autostage' overrides it. Sign

[RFC PATCH 4/5] Add tests for rebase --continue --autostage

2017-07-26 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> Make sure that --autostage stages any changes and fails if there are merge markers in the file to be staged. Signed-off-by: Phillip Wood <phillip.w...@dunelm.org.uk> --- t/t3418-rebase-continue.sh | 35 +++

[RFC PATCH 2/5] rebase -i: improve --continue --autostage

2017-07-26 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> If HEAD has changed since the rebase stopped or rebase stopped due to a failed exec then 'git rebase --continue --autostage' will autostage changes that cannot be commited. Fix this by reordering some of the checks so that 'git rebase --co

Re: [PATCH/RFC] rebase: make resolve message clearer for inexperienced users

2017-07-26 Thread Phillip Wood
On 24/07/17 21:53, Junio C Hamano wrote: Phillip Wood <phillip.w...@talktalk.net> writes: git rebase --continue requiring one to git add first confuses/annoys me too. I started a patch to autostage unstaged changes if they don't contain conflict markers a couple of weeks ago, I'll clean

Re: [PATCH/RFC] rebase: make resolve message clearer for inexperienced users

2017-07-24 Thread Phillip Wood
On 16/07/17 12:39, Philip Oakley wrote: > > From: "Junio C Hamano" > Sent: Wednesday, July 12, 2017 10:29 PM >> William Duclot writes: >> - The original said "When you have resolved this problem", without giving a guidance how to

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

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

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

2017-06-30 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> 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 <phillip.w...@dune

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

2017-06-30 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> 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 a

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

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

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

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

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 <phillip.w...@dunelm.org.uk> >> >> I'm using this in some scripts and it would be more convenient to have >> it available from Git.pm rat

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

[PATCH v2] am: fix signoff when other trailers are present

2017-08-08 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> If there was no 'Signed-off-by:' trailer but another trailer such as 'Reported-by:' then 'git am --signoff' would add a blank line between the existing trailers and the added 'Signed-off-by:' line. e.g. Rebase accepts '--rerere-auto

Re: [PATCH v1] am: fix signoff when other trailers are present

2017-08-08 Thread Phillip Wood
On 07/08/17 18:49, Junio C Hamano wrote: > Phillip Wood <phillip.w...@talktalk.net> writes: > >> From: Phillip Wood <phillip.w...@dunelm.org.uk> >> >> If there was no 'Signed-off-by:' trailer but another trailer such as >> 'Reported-by:' then 'git am

Re: [PATCH v1] am: fix signoff when other trailers are present

2017-08-08 Thread Phillip Wood
On 07/08/17 19:08, Jonathan Tan wrote: > On Mon, 07 Aug 2017 10:49:28 -0700 > Junio C Hamano <gits...@pobox.com> wrote: > >> Phillip Wood <phillip.w...@talktalk.net> writes: >> >>> From: Phillip Wood <phillip.w...@dunelm.org.uk> >>> >>

[PATCH v1] am: fix signoff when other trailers are present

2017-08-07 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> If there was no 'Signed-off-by:' trailer but another trailer such as 'Reported-by:' then 'git am --signoff' would add a blank line between the existing trailers and the added 'Signed-off-by:' line. e.g. Rebase accepts '--rerere-auto

Re: [PATCH 6/6] cherry-pick/revert: reject --rerere-autoupdate when continuing

2017-08-07 Thread Phillip Wood
On 03/08/17 18:19, Junio C Hamano wrote: > Phillip Wood <phillip.w...@talktalk.net> writes: > >> On 02/08/17 23:29, Junio C Hamano wrote: >> ... >>> The >>> latter makes it more in line with how "am -3" followed by "am --no-3 >>>

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

2017-05-18 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> 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 m

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

2017-05-18 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> 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

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

2017-05-18 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> 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 t

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

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

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

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

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

2017-06-22 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> Not that we've copied unquote_path() to Git.pm use that copy instead of our own. Signed-off-by: Phillip Wood <phillip.w...@dunelm.org.uk> --- git-add--interactive.perl | 43 +-- 1 file changed,

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

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

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

2017-06-22 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> 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 <phillip.w...@dunelm.org.uk> ---

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

2017-06-22 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> 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

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

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

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

2017-06-19 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> Check that the reflog message written to the branch reflog when the rebase is completed is correct Signed-off-by: Phillip Wood <phillip.w...@dunelm.org.uk> --- t/t3404-rebase-interactive.sh | 7 +++ 1 file changed, 7 insertions(+)

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

2017-06-19 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> 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 Schi

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

2017-06-19 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> 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 Schi

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

2017-06-19 Thread Phillip Wood
parts of the interactive rebase in the sequencer 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 <johannes.schinde...@gmx.de> Signed-off-by: Phillip Wood <phillip.w..

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

2017-06-19 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> 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 hi

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] 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 <phillip.w...@dunelm.org.uk> >> >> The message that's printed when auto-stashed changes are successfully >> restored was m

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

2017-05-18 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> 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..4dc

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 <phillip.w...@talktalk.net> wrote: From: Phillip Wood <phillip.w...@dunelm.org.uk> The message that's printed when auto-stashed changes are successfully restored was missing '\n' at the

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 <phillip.w...@talktalk.net> wrote: On 18/05/17 22:21, Johannes Schindelin wrote: Hi Phillip, On Thu, 18 May 2017, Phillip Wood wrote: From: Phillip Wood <phillip.w...@dunelm.org.uk>

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

2017-05-19 Thread phillip . wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> The message that's printed when auto-stashed changes are successfully restored was missing '\n' at the end. Signed-off-by: Phillip Wood <phillip.w...@dunelm.org.uk> Acked-by: Johannes Schindelin <johannes.schinde...@gmx.de> ---

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 <phillip.w...@dunelm.org.uk> >> >> Check the console output when using --autostash and the

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 <phillip.w...@dunelm.org.uk> 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

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

2017-05-31 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> 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

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

2017-05-31 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> 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 <phillip.w...@dune

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

2017-05-31 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> 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 r

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

2017-05-31 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> Check that the console output is what we expect when restoring autostashed changes fails. Signed-off-by: Phillip Wood <phillip.w...@dunelm.org.uk> --- t/t3420-rebase-autostash.sh | 10 +- t/t3420/expected-fail-am

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 <gits...@pobox.com> writes: > >> Junio C Hamano <gits...@pobox.com> writes: >> >>> Phillip Wood <phillip.w...@talktalk.net> writes: >>> >>>> From: Phillip Wood <ph

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 <phillip.w...@talktalk.net> 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 typi

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

2017-06-14 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> 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 Schi

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

2017-06-14 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> Check that the reflog message written to the branch reflog when the rebase is completed is correct Signed-off-by: Phillip Wood <phillip.w...@dunelm.org.uk> --- t/t3404-rebase-interactive.sh | 7 +++ 1 file changed, 7 insertions(+)

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

2017-06-14 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> 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 Schi

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

2017-06-14 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> 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 regr

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

Re: [PATCH 2/3] merge-base: return fork-point outside reflog

2017-09-15 Thread Phillip Wood
On 15/09/17 03:48, Junio C Hamano wrote: > > Michael J Gruber writes: > >> In fact, per documentation "--fork-point" looks at the reflog in >> addition to doing the usual walk from the tip. The original design >> description in d96855ff51 ("merge-base: teach "--fork-point"

Re: [PATCH] doc: update information about windows build

2017-09-17 Thread Phillip Wood
On 17/09/17 06:28, Kaartic Sivaraam wrote: 029aeeed5 (travis-ci: build and test Git on Windows, 2017-03-24) added support for testing the git build for Windows. So, update the documentation and the example used in it. From that commit: diff --git a/ci/run-windows-build.sh

Re: Commit dropped when swapping commits with rebase -i -p

2017-09-17 Thread Phillip Wood
On 16/09/17 14:45, Sebastian Schuberth wrote: On Sat, Sep 16, 2017 at 12:41 PM, Andreas Heiduk wrote: Therefore I would avoid "definitive wording" like "will drop" and use vague wording along "there are various dragons out there" like this: The todo list presented

Re: [PATCH] doc: update information about windows build

2017-09-17 Thread Phillip Wood
On 17/09/17 14:42, Kaartic Sivaraam wrote: On Sun, 2017-09-17 at 14:24 +0100, Phillip Wood wrote: From that commit: diff --git a/ci/run-windows-build.sh b/ci/run-windows-build.sh new file mode 100755 index 0..4e3a50b60 --- /dev/null +++ b/ci/run-windows-build.sh @@ -0,0 +1,74

[RFC PATCH 1/8] commit: move empty message checks to libgit

2017-09-25 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> Signed-off-by: Phillip Wood <phillip.w...@dunelm.org.uk> --- builtin/commit.c | 70 +++- sequencer.c | 60 sequencer.h | 10

[RFC PATCH 4/8] commit: move post-rewrite code to libgit

2017-09-25 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> Signed-off-by: Phillip Wood <phillip.w...@dunelm.org.uk> --- builtin/commit.c | 42 +- sequencer.c | 46 ++ sequencer.h | 2 ++ 3 files

[RFC PATCH 5/8] commit: move print_commit_summary() to libgit

2017-09-25 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> Signed-off-by: Phillip Wood <phillip.w...@dunelm.org.uk> --- builtin/commit.c | 126 --- sequencer.c | 116 ++ sequencer.h

[RFC PATCH 6/8] sequencer: simplify adding Signed-off-by: trailer

2017-09-25 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> Add the Signed-off-by: trailer in one place rather than adding it to the message when doing a recursive merge and then again when committing. This means that if there are conflicts when merging with a strategy other than 'recursive' the Sign

[RFC PATCH 7/8] sequencer: load commit related config

2017-09-25 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> Load default values for message cleanup and gpg signing of commits in preparation for committing without forking 'git commit'. Signed-off-by: Phillip Wood <phillip.w...@dunelm.org.uk> --- builtin/rebase--helper.c | 13 ++

[RFC PATCH 3/8] sequencer: refactor update_head()

2017-09-25 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> The previous commit was a mechanical translation of the code from builtin/commit.c. Now that it uses its own strbuf for the reflog message it can be simplified slightly. Signed-off-by: Phillip Wood <phillip.w...@dunelm.org.uk> --- seq

[RFC PATCH 0/8] sequencer: dont't fork git commit

2017-09-25 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> These patches teach the sequencer to create commits without forking git commit when the commit message does not need to be edited. This speeds up cherry picking 10 commits by 26% and picking 10 commits with rebase --continue by 44%. The fir

[RFC PATCH 8/8] sequencer: try to commit without forking 'git commit'

2017-09-25 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> If the commit message does not need to be edited then create the commit without forking 'git commit'. Taking the best time of ten runs with a warm cache this reduces the time taken to cherry-pick 10 commits by 26% (from 319ms to 235ms), and th

[RFC PATCH 2/8] commit: move code to update HEAD to libgit

2017-09-25 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> Signed-off-by: Phillip Wood <phillip.w...@dunelm.org.uk> --- builtin/commit.c | 31 +++ sequencer.c | 39 ++- sequencer.h | 2 ++ 3 files changed, 47 inser

Re: [RFC PATCH 0/5] Add option to autostage changes when continuing a rebase

2017-08-24 Thread Phillip Wood
On 22/08/17 16:54, Junio C Hamano wrote: > Phillip Wood <phillip.w...@talktalk.net> writes: > >>> In other words, instead of >>> >>> git add -u && git rebase --continue >>> >>> you would want a quicker way to say

Re: [BUG] rebase -i with only empty commits

2017-08-24 Thread Phillip Wood
On 23/08/17 15:40, Johannes Schindelin wrote: > > These days, I reflexively type `rebase -ki` instead of `rebase -i`. Maybe > you want to do that, too? > > Ciao, > Dscho > This is slightly off topic but when I was preparing the patches for [1] I noticed a couple of potential bugs with rebase

Re: [RFC PATCH 0/5] Add option to autostage changes when continuing a rebase

2017-08-21 Thread Phillip Wood
On 27/07/17 16:24, Junio C Hamano wrote: > Phillip Wood <phillip.w...@talktalk.net> writes: > >>> On 26/07/17 23:12, Junio C Hamano wrote: >>>> I think >>>> you are already 80% there without adding a yet another option,... >>> ... >>

Re: [RFC PATCH 0/5] Add option to autostage changes when continuing a rebase

2017-08-22 Thread Phillip Wood
On 21/08/17 23:41, Junio C Hamano wrote: > Phillip Wood <phillip.w...@talktalk.net> writes: > >> ... I prefer >> having to pass --autostage with --continue so that it is a concious >> decision by the user to stage unstaged changes when they continue rather >>

Re: [RFC PATCH 0/5] Add option to autostage changes when continuing a rebase

2017-08-25 Thread Phillip Wood
On 24/08/17 17:46, Junio C Hamano wrote: > Phillip Wood <phillip.w...@talktalk.net> writes: > >> It could be expensive to check that the local modifications will not >> interfere with the rebase - wouldn't it have to look at all the files >> touched by each commit b

Re: [RFC PATCH 2/8] commit: move code to update HEAD to libgit

2017-10-24 Thread Phillip Wood
On 07/10/17 10:54, Junio C Hamano wrote: > Phillip Wood <phillip.w...@talktalk.net> writes: > >> From: Phillip Wood <phillip.w...@dunelm.org.uk> >> >> Signed-off-by: Phillip Wood <phillip.w...@dunelm.org.uk> >> --- > > This seems to do a l

[PATCH v2 4/9] commit: move post-rewrite code to libgit

2017-11-10 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> Move run_rewrite_hook() from bulitin/commit.c to sequencer.c so it can be shared with other commands and add a new function commit_post_rewrite() based on the code in builtin/commit.c that encapsulates rewriting notes and running the post-r

[PATCH v2 9/9] sequencer: try to commit without forking 'git commit'

2017-11-10 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> If the commit message does not need to be edited then create the commit without forking 'git commit'. Taking the best time of ten runs with a warm cache this reduces the time taken to cherry-pick 10 commits by 27% (from 282ms to 204ms), and th

[PATCH v2 8/9] sequencer: load commit related config

2017-11-10 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> Load default values for message cleanup and gpg signing of commits in preparation for committing without forking 'git commit'. Signed-off-by: Phillip Wood <phillip.w...@dunelm.org.uk> --- Notes: changes since v1:

[PATCH v2 0/9] sequencer: dont't fork git commit

2017-11-10 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> Thanks for the feedback on v1 I've updated the patches as suggested. See the comments on each patch for what has changed. I've added a patch to the start of the series to test the commit messages of intermediate squashes. I've added this as t

[PATCH v2 6/9] sequencer: don't die in print_commit_summary()

2017-11-10 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> Return an error rather than dying so that the sequencer can exit cleanly once it starts committing without forking 'git commit' Signed-off-by: Phillip Wood <phillip.w...@dunelm.org.uk> --- builtin/commit.c | 3 ++- sequencer

[PATCH v2 1/9] t3404: check intermediate squash messages

2017-11-10 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> When there is more than one squash/fixup command in a row check the intermediate messages are correct. Signed-off-by: Phillip Wood <phillip.w...@dunelm.org.uk> --- t/t3404-rebase-interactive.sh | 4 1 file changed, 4 insertions(+)

[PATCH v2 5/9] commit: move print_commit_summary() to libgit

2017-11-10 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> Move print_commit_summary() from builtin/commit.c to sequencer.c so it can be shared with other commands. The function is modified by changing the last argument to a flag so callers can specify whether they want to show the author date in ad

[PATCH v2 3/9] Add a function to update HEAD after creating a commit

2017-11-10 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> Add update_head() based on the code that updates HEAD after committing in builtin/commit.c that can be called by 'git commit' and other commands. Signed-off-by: Phillip Wood <phillip.w...@dunelm.org.uk> --- Notes: chan

[PATCH v2 7/9] sequencer: simplify adding Signed-off-by: trailer

2017-11-10 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> Add the Signed-off-by: trailer in one place rather than adding it to the message when doing a recursive merge and specifying '--signoff' when running 'git commit'. This means that if there are conflicts when merging with a strategy othe

[PATCH v2 2/9] commit: move empty message checks to libgit

2017-11-10 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> Move the functions that check for empty messages from bulitin/commit.c to sequencer.c so they can be shared with other commands. The functions are refactored to take an explicit cleanup mode and template filename passed by the caller. Sign

Re: [PATCH v1 5/8] sequencer: don't die in print_commit_summary()

2017-11-13 Thread Phillip Wood
On 10/11/17 18:05, Junio C Hamano wrote: > Phillip Wood <phillip.w...@talktalk.net> writes: > >> On 07/11/17 15:13, Junio C Hamano wrote: >> ... >>> Another possibility perhaps is that the function is safe to reuse >>> already even without th

  1   2   3   4   5   6   >