Re: [SCRIPT/RFC 0/3] git-commit --onto-parent (three-way merge,noworking tree file changes)

2017-12-09 Thread Phillip Wood
Hi Igor On 09/12/17 03:03, Igor Djordjevic wrote: > > Hi Alexei, > > On 09/12/2017 03:18, Alexei Lozovsky wrote: >> >>> Chris reported in this very topic[1] that sometimes, due to >>> conflicts with later commits, "checkout > commit > [checkout >] >>> rebase --onto" is "much easier to do",

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

2017-12-09 Thread Phillip Wood
On 05/12/17 11:21, Phillip Wood wrote: > On 04/12/17 18:30, Junio C Hamano wrote: >> Phillip Wood <phillip.w...@talktalk.net> writes: >> >>> --- a/builtin/rebase--helper.c >>> +++ b/builtin/rebase--helper.c >>> @@ -9,6 +9,17 @@ stati

Re: [SCRIPT/RFC 0/3] git-commit --onto-parent (three-way merge, noworking tree file changes)

2017-12-09 Thread Phillip Wood
Hi Igor On 09/12/17 03:03, Igor Djordjevic wrote: > > Hi Alexei, > > On 09/12/2017 03:18, Alexei Lozovsky wrote: >> >>> Chris reported in this very topic[1] that sometimes, due to >>> conflicts with later commits, "checkout > commit > [checkout >] >>> rebase --onto" is "much easier to do",

Re: [PATCH v4 9/9] t3512/t3513: remove KNOWN_FAILURE_CHERRY_PICK_SEES_EMPTY_COMMIT=1

2017-12-05 Thread Phillip Wood
On 04/12/17 19:24, Stefan Beller wrote: > On Fri, Nov 24, 2017 at 3:07 AM, Phillip Wood <phillip.w...@talktalk.net> > wrote: >> From: Phillip Wood <phillip.w...@dunelm.org.uk> >> >> Now that the sequencer creates commits without forking 'git commit

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

2017-12-05 Thread Phillip Wood
On 05/12/17 11:21, Phillip Wood wrote: > On 04/12/17 18:30, Junio C Hamano wrote: >> Phillip Wood <phillip.w...@talktalk.net> writes: >> >>> --- a/builtin/rebase--helper.c >>> +++ b/builtin/rebase--helper.c >>> @@ -9,6 +9,17 @@ stati

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

2017-12-05 Thread Phillip Wood
On 04/12/17 18:30, Junio C Hamano wrote: > Phillip Wood <phillip.w...@talktalk.net> writes: > >> --- a/builtin/rebase--helper.c >> +++ b/builtin/rebase--helper.c >> @@ -9,6 +9,17 @@ static const char * const builtin_rebase_helper_usage[] = { >>

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

2017-11-24 Thread Phillip Wood
On 24/11/17 13:48, Junio C Hamano wrote: > Phillip Wood <phillip.w...@talktalk.net> writes: > >> From: Phillip Wood <phillip.w...@dunelm.org.uk> >> >> Load default values for message cleanup and gpg signing of commits in >> preparation for committing

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

2017-11-24 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 v4 3/9] Add a function to update HEAD after creating a commit

2017-11-24 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> Add update_head_with_reflog() 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 v4 8/9] sequencer: try to commit without forking 'git commit'

2017-11-24 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 v4 7/9] sequencer: load commit related config

2017-11-24 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'. Note that we interpret commit.cleanup=scissors to mean COMMIT_MSG_CLEANUP_SPACE to be consistent with 'git commit'

[PATCH v4 9/9] t3512/t3513: remove KNOWN_FAILURE_CHERRY_PICK_SEES_EMPTY_COMMIT=1

2017-11-24 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> Now that the sequencer creates commits without forking 'git commit' it does not see an empty commit in these tests which fixes the known breakage. Note that logic for handling KNOWN_FAILURE_CHERRY_PICK_SEES_EMPTY_COMMIT=1 is not removed fr

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

2017-11-24 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 v4 2/9] commit: move empty message checks to libgit

2017-11-24 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

[PATCH v4 6/9] sequencer: simplify adding Signed-off-by: trailer

2017-11-24 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 v4 0/9] sequencer: don't fork git commit

2017-11-24 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> I've updated the patches to fix the embarassing build failure in v3. I've also added a patch to remove the known breakage from some of the tests in t3512/t3513 that now pass - someone who knows about submodules should check this. The only

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

2017-11-24 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(+)

Re: t3512 & t3513 'unexpected passes'

2017-11-21 Thread Phillip Wood
On 21/11/17 10:44, Adam Dinwoodie wrote: > On Monday 20 November 2017 at 08:16 pm +, Ramsay Jones wrote: >> For several days, I have been staring at some 'unexpected passes' in >> the t3512-cherry-pick-submodule.sh and t3513-revert-submodule.sh test >> files (tests #11-13 in both cases).

Re: [PATCH v3 0/8] sequencer: don't fork git commit

2017-11-18 Thread Phillip Wood
On 18/11/17 03:57, 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> >>> >>> I've updated these based

Re: [PATCH v3 0/8] sequencer: don't fork git commit

2017-11-18 Thread Phillip Wood
On 18/11/17 03:57, 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> >>> >>> I've updated these based

Re: [PATCH] config: avoid "write_in_full(fd, buf, len) != len" pattern

2017-11-18 Thread Phillip Wood
On 17/11/17 22:06, Jeff King wrote: > On Wed, Nov 15, 2017 at 12:40:43PM +0000, Phillip Wood wrote: > >> From: Phillip Wood <phillip.w...@dunelm.org.uk> >> >> As explained in commit 06f46f237 (avoid "write_in_full(fd, buf, len) >> != len" pattern,

[PATCH v3 2/8] commit: move empty message checks to libgit

2017-11-17 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

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

2017-11-17 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 v3 3/8] Add a function to update HEAD after creating a commit

2017-11-17 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> Add update_head_with_reflog() 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 v3 4/8] commit: move post-rewrite code to libgit

2017-11-17 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 v3 0/8] sequencer: don't fork git commit

2017-11-17 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> I've updated these based on the feedback for v2. I've dropped the patch that stopped print_commit_summary() from dying as I think it is better to die than return an error (see the commit message of the patch that adds print_commit_s

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

2017-11-17 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 v3 8/8] sequencer: try to commit without forking 'git commit'

2017-11-17 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 v3 5/8] commit: move print_commit_summary() to libgit

2017-11-17 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 v3 1/8] t3404: check intermediate squash messages

2017-11-17 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(+)

Re: [PATCH v2] sequencer: reschedule pick if index can't be locked

2017-11-16 Thread Phillip Wood
On 16/11/17 05:22, Junio C Hamano wrote: > From: Phillip Wood <phillip.w...@dunelm.org.uk> > Date: Wed, 15 Nov 2017 10:41:25 + > > If the index cannot be locked in do_recursive_merge(), issue an > error message and go on to the error recovery codepath, instead of >

Re: [PATCH] sequencer: reschedule pick if index can't be locked

2017-11-16 Thread Phillip Wood
On 15/11/17 18:44, Martin Ågren wrote: On 15 November 2017 at 11:41, Phillip Wood <phillip.w...@talktalk.net> wrote: From: Phillip Wood <phillip.w...@dunelm.org.uk> Return an error instead of dying if the index cannot be locked in do_recursive_merge() as if the commit cannot be pic

[PATCH] config: avoid "write_in_full(fd, buf, len) != len" pattern

2017-11-15 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> As explained in commit 06f46f237 (avoid "write_in_full(fd, buf, len) != len" pattern, 2017–09–13) the return value of write_in_full() is either -1 or the requested number of bytes. As such comparing the return value to a

[PATCH] sequencer: reschedule pick if index can't be locked

2017-11-15 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> Return an error instead of dying if the index cannot be locked in do_recursive_merge() as if the commit cannot be picked it needs to be rescheduled when performing an interactive rebase. If the pick is not rescheduled and the user runs 'git

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

2017-11-13 Thread Phillip Wood
On 10/11/17 18:36, Junio C Hamano wrote: > Phillip Wood <phillip.w...@talktalk.net> writes: > >> From: Phillip Wood <phillip.w...@dunelm.org.uk> >> >> Add update_head() based on the code that updates HEAD after committing >> in builtin/commit.c th

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

2017-11-13 Thread Phillip Wood
On 10/11/17 19:21, Junio C Hamano wrote: > Phillip Wood <phillip.w...@talktalk.net> writes: > >> Here's the summary from the previous version >> These patches teach the sequencer to create commits without forking >> git commit when the commit message does not need t

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

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

2017-11-13 Thread Phillip Wood
On 10/11/17 18:51, Ramsay Jones wrote: > > > On 10/11/17 11:09, Phillip Wood wrote: >> 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 share

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

2017-11-10 Thread Phillip Wood
On 07/11/17 15:13, Junio C Hamano wrote: > Junio C Hamano writes: > >> And this step is going in the right direction, but I am not sure if >> this made the function safe enough to be called repeatedly from the >> rebase machinery and we are ready to unleash this to the end

[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 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 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 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 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 6/8] sequencer: simplify adding Signed-off-by: trailer

2017-11-07 Thread Phillip Wood
On 07/11/17 04:52, Junio C Hamano wrote: > Phillip Wood <phillip.w...@talktalk.net> writes: > >> diff --git a/sequencer.c b/sequencer.c >> index >> ae24405c23d021ed7916e5e2d9df6de27f867a2e..3e4c3bbb265db58df22cfcb5a321fb74d822327e >> 100644 >> --- a/seq

Re: [PATCH v1 4/8] commit: move print_commit_summary() to libgit

2017-11-07 Thread Phillip Wood
On 07/11/17 03:38, Junio C Hamano wrote: > Phillip Wood <phillip.w...@talktalk.net> writes: > >> From: Phillip Wood <phillip.w...@dunelm.org.uk> >> >> Move print_commit_summary() from builtin/commit.c to sequencer.c so it >> can be shared wit

Re: [PATCH v1 3/8] commit: move post-rewrite code to libgit

2017-11-07 Thread Phillip Wood
On 07/11/17 03:03, Junio C Hamano wrote: > Phillip Wood <phillip.w...@talktalk.net> writes: > >> From: Phillip Wood <phillip.w...@dunelm.org.uk> >> >> Move run_rewrite_hook() from bulitin/commit.c to sequencer.c so it can >> be shared

Re: [PATCH v1 2/8] Add a function to update HEAD after creating a commit

2017-11-07 Thread Phillip Wood
On 07/11/17 03:02, Johannes Schindelin wrote: > Hi Junio, > > On Tue, 7 Nov 2017, Junio C Hamano wrote: > >> Phillip Wood <phillip.w...@talktalk.net> writes: >> >>> @@ -751,6 +751,42 @@ int template_untouched(const struct strbuf *sb, const >>> c

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

2017-11-07 Thread Phillip Wood
On 07/11/17 00:43, Johannes Schindelin wrote: > Hi Phillip, > > On Mon, 6 Nov 2017, Phillip Wood wrote: > >> From: Phillip Wood <phillip.w...@dunelm.org.uk> >> >> Move the functions that check for empty messages from bulitin/commit.c >> to sequencer.c

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

2017-11-07 Thread Phillip Wood
On 07/11/17 01:36, Johannes Schindelin wrote: > Hi Phillip, > > On Mon, 6 Nov 2017, Phillip Wood wrote: > >> From: Phillip Wood <phillip.w...@dunelm.org.uk> >> >> If the commit message does not need to be edited then create the >> commit without forking

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

2017-11-07 Thread Phillip Wood
Thanks for looking at these patches On 07/11/17 01:02, Johannes Schindelin wrote: > Hi Phillip, > > On Mon, 6 Nov 2017, Phillip Wood wrote: > >> From: Phillip Wood <phillip.w...@dunelm.org.uk> >> >> Load default values for message cleanup and gpg

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

2017-11-06 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

[PATCH v1 2/8] Add a function to update HEAD after creating a commit

2017-11-06 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> --- builtin/c

[PATCH v1 4/8] commit: move print_commit_summary() to libgit

2017-11-06 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 v1 8/8] sequencer: try to commit without forking 'git commit'

2017-11-06 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 v1 5/8] sequencer: don't die in print_commit_summary()

2017-11-06 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 v1 6/8] sequencer: simplify adding Signed-off-by: trailer

2017-11-06 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 v1 7/8] sequencer: load commit related config

2017-11-06 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 ++

[PATCH v1 3/8] commit: move post-rewrite code to libgit

2017-11-06 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 v1 0/8] sequencer: dont't fork git commit

2017-11-06 Thread Phillip Wood
From: Phillip Wood <phillip.w...@dunelm.org.uk> Changes since the last version - reworked the second patch based on Junio's feedback so it no longer sets GIT_REFLOG_ACTION - reworded commit messages - print_commit_summary() no longer dies but returns an error so the sequencer ca

Re: [PATCH] rebase: exec leaks GIT_DIR to environment

2017-10-30 Thread Phillip Wood
On 30/10/17 06:26, Jacob Keller wrote: > On Sun, Oct 29, 2017 at 8:36 PM, Junio C Hamano wrote: >> Jacob Keller writes: >> >>> I am pretty confident we can fix it >> >> I am sure we can eventually, but 3 hours is not enough soak time. >> >> I am

Re: [PATCH] rebase: exec leaks GIT_DIR to environment

2017-10-29 Thread Phillip Wood
On 28/10/17 17:00, Johannes Schindelin wrote: > > Hi Jake, > > On Fri, 27 Oct 2017, Jacob Keller wrote: > >> From: Jacob Keller >> >> I noticed a failure with git rebase interactive mode which causes "exec" >> commands to be run with GIT_DIR set. When GIT_DIR is in the

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

[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

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

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

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

[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

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

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

<    1   2   3   4   5   6   >