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-25 Thread Phillip Wood
On 24/08/17 17:46, Junio C Hamano wrote: > Phillip Wood 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 before starting? What do cherr

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" mode", >> 2013-10-23)

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 b/ci/run-windows-bui

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 by `--preserve-merges

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 Signed-off-by: Phillip Wood --- builtin/commit.c | 70 +++- sequencer.c | 60 sequencer.h | 10 3 files changed, 73 insertions(+), 67 deletions(-) diff

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

2017-09-25 Thread Phillip Wood
From: Phillip Wood Signed-off-by: Phillip Wood --- builtin/commit.c | 42 +- sequencer.c | 46 ++ sequencer.h | 2 ++ 3 files changed, 49 insertions(+), 41 deletions(-) diff --git a/builtin/commit.c

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

2017-09-25 Thread Phillip Wood
From: Phillip Wood Signed-off-by: Phillip Wood --- builtin/commit.c | 126 --- sequencer.c | 116 ++ sequencer.h | 5 +++ 3 files changed, 129 insertions(+), 118 deletions(-) diff

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

2017-09-25 Thread Phillip Wood
From: Phillip Wood 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 Signed-off-by: trailer will b

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

2017-09-25 Thread Phillip Wood
From: Phillip Wood Load default values for message cleanup and gpg signing of commits in preparation for committing without forking 'git commit'. Signed-off-by: Phillip Wood --- builtin/rebase--helper.c | 13 - builtin/revert.c | 15 +-- s

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

2017-09-25 Thread Phillip Wood
From: Phillip Wood 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 --- sequencer.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions

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

2017-09-25 Thread Phillip Wood
From: Phillip Wood 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 first few patches move bits of builtin

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

2017-09-25 Thread Phillip Wood
From: Phillip Wood 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 the time taken by &

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

2017-09-25 Thread Phillip Wood
From: Phillip Wood Signed-off-by: Phillip Wood --- builtin/commit.c | 31 +++ sequencer.c | 39 ++- sequencer.h | 2 ++ 3 files changed, 47 insertions(+), 25 deletions(-) diff --git a/builtin/commit.c b/builtin

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 writes: > >> From: Phillip Wood >> >> Signed-off-by: Phillip Wood >> --- > > This seems to do a lot more than just moving code, most notably, it > uses setenv() to affect what happens in any subproc

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 environment, >> then any

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 inclined to leave the fix for 2.15.1/2.16.0 ins

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

2017-11-06 Thread Phillip Wood
From: Phillip Wood 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 can exit cleanly - reworked the

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

2017-11-06 Thread Phillip Wood
From: Phillip Wood 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-rewrite hook. Signed-off-by: Phillip

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

2017-11-06 Thread Phillip Wood
From: Phillip Wood Load default values for message cleanup and gpg signing of commits in preparation for committing without forking 'git commit'. Signed-off-by: Phillip Wood --- builtin/rebase--helper.c | 13 - builtin/revert.c | 15 +-- s

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

2017-11-06 Thread Phillip Wood
From: Phillip Wood 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 other than 'rec

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

2017-11-06 Thread Phillip Wood
From: Phillip Wood 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 --- builtin/commit.c | 3 ++- sequencer.c | 17 +++-- sequencer.h | 4 ++-- 3 fil

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

2017-11-06 Thread Phillip Wood
From: Phillip Wood 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 the time taken by &

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

2017-11-06 Thread Phillip Wood
From: Phillip Wood 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 addition to specifying if this is an

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

2017-11-06 Thread Phillip Wood
From: Phillip Wood 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 --- builtin/commit.c | 19 +-- sequencer.c

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

2017-11-06 Thread Phillip Wood
From: Phillip Wood 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. Signed-off-by: Phillip Wood --- builtin

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 >> >> Load default values for message cleanup and gpg signing of commits in >> preparation

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 >> >> If the commit message does not need to be edited then create the >> commit without forking 'git commit'. Taking

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 >> >> Move the functions that check for empty messages from bulitin/commit.c >> to sequencer.c so they can be shared with

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 writes: >> >>> @@ -751,6 +751,42 @@ int template_untouched(const struct strbuf *sb, const >>> char *template_file, >&g

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 writes: > >> From: Phillip Wood >> >> 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

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 writes: > >> From: Phillip Wood >> >> 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 argum

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 writes: > >> diff --git a/sequencer.c b/sequencer.c >> index >> ae24405c23d021ed7916e5e2d9df6de27f867a2e..3e4c3bbb265db58df22cfcb5a321fb74d822327e >> 100644 >> --- a/sequencer.c >> +++ b/seq

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

2017-11-10 Thread Phillip Wood
From: Phillip Wood 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. Signed-off-by: Phillip Wood --- Notes

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

2017-11-10 Thread Phillip Wood
From: Phillip Wood 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 --- builtin/commit.c | 3 ++- sequencer.c | 17 +++-- sequencer.h | 4 ++-- 3 fil

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

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

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

2017-11-10 Thread Phillip Wood
From: Phillip Wood 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 addition to specifying if this is an

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

2017-11-10 Thread Phillip Wood
From: Phillip Wood 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-rewrite hook. Once the sequencer

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

2017-11-10 Thread Phillip Wood
From: Phillip Wood 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 the time taken by &

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

2017-11-10 Thread Phillip Wood
From: Phillip Wood Load default values for message cleanup and gpg signing of commits in preparation for committing without forking 'git commit'. Signed-off-by: Phillip Wood --- Notes: changes since v1: - renamed git_revert_config() to common_config() - prefixed cl

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

2017-11-10 Thread Phillip Wood
From: Phillip Wood 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 the RFC version of

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

2017-11-10 Thread Phillip Wood
From: Phillip Wood 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 --- Notes: changes since v1: - rename update_head() to update_head_with_reflog()

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

2017-11-10 Thread Phillip Wood
From: Phillip Wood 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 other than 'rec

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 users >> and tell them

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 >> >> Move the functions that check for empty messages from bulitin/commit.c >> to sequencer.c so they can be shared with other commands. The >> funct

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 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 this patch, of course ;-). >>> >&

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 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 to be edited. This >>

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 writes: > >> From: Phillip Wood >> >> 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 >&g

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

2017-11-15 Thread Phillip Wood
From: Phillip Wood 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 rebase --continue' rather

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

2017-11-15 Thread Phillip Wood
From: Phillip Wood 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 an unsigned value such as strbuf.len will fai

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 wrote: From: Phillip Wood 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

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 > 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 > dying. When the commit cannot be p

[PATCH v3 1/8] t3404: check intermediate squash messages

2017-11-17 Thread Phillip Wood
From: Phillip Wood When there is more than one squash/fixup command in a row check the intermediate messages are correct. Signed-off-by: Phillip Wood --- t/t3404-rebase-interactive.sh | 4 1 file changed, 4 insertions(+) diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase

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

2017-11-17 Thread Phillip Wood
From: Phillip Wood 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 addition to specifying if this is an

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

2017-11-17 Thread Phillip Wood
From: Phillip Wood 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 the time taken by &

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

2017-11-17 Thread Phillip Wood
From: Phillip Wood 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-rewrite hook. Once the sequencer

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

2017-11-17 Thread Phillip Wood
From: Phillip Wood 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_summary() for the reasoning). Apart

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

2017-11-17 Thread Phillip Wood
From: Phillip Wood Load default values for message cleanup and gpg signing of commits in preparation for committing without forking 'git commit'. Signed-off-by: Phillip Wood --- Notes: changes since v1: - renamed git_revert_config() to common_config() - prefixed cl

[PATCH v3 3/8] Add a function to update HEAD after creating a commit

2017-11-17 Thread Phillip Wood
From: Phillip Wood 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 --- Notes: changes since v2: - updated commit message to reflect the

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

2017-11-17 Thread Phillip Wood
From: Phillip Wood 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. Signed-off-by: Phillip Wood --- Notes

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

2017-11-17 Thread Phillip Wood
From: Phillip Wood 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 other than 'rec

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 >> >> As explained in commit 06f46f237 (avoid "write_in_full(fd, buf, len) >> != len" pattern, 2017–09–13) the return value o

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 writes: > >> Phillip Wood writes: >> >>> From: Phillip Wood >>> >>> I've updated these based on the feedback for v2. I've dropped the >>> patch that stopped print_com

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 writes: > >> Phillip Wood writes: >> >>> From: Phillip Wood >>> >>> I've updated these based on the feedback for v2. I've dropped the >>> patch that stopped print_com

Re: [PATCH 1/1] commit: add support to provide --coauthor

2019-10-08 Thread Phillip Wood
Hi Toon & Zeger-Jan On 08/10/2019 08:49, Toon Claes wrote: Add support to provide the Co-author when committing. For each co-author provided with --coauthor=, a line is added at the bottom of the commit message, like this: Co-authored-by: It's a common practice use when pairing up with o

Re: [PATCH 1/1] commit: add support to provide --coauthor

2019-10-08 Thread Phillip Wood
On 08/10/2019 11:11, Phillip Wood wrote: > Hi Toon & Zeger-Jan > > On 08/10/2019 08:49, Toon Claes wrote: >> Add support to provide the Co-author when committing. For each >> co-author provided with --coauthor=, a line is added at the >> bottom of the commit me

Re: Raise your hand to Ack jk/code-of-conduct if your Ack fell thru cracks

2019-10-09 Thread Phillip Wood
who wanted to give their Acks but forgot to do so, to raise their hands on this thread. I forgot to add Acked-by: Phillip Wood to my original reply in this thread, could you add it please Thanks Phillip Thanks for starting the concluding move on this topic. For reference, here is the CoC

Re: [PATCH 3/3] sequencer: run post-commit hook

2019-10-11 Thread Phillip Wood
Hi Dscho On 10/10/2019 22:31, Johannes Schindelin wrote: Hi Phillip, On Thu, 10 Oct 2019, Phillip Wood via GitGitGadget wrote: From: Phillip Wood Prior to commit 356ee4659b ("sequencer: try to commit without forking 'git commit'", 2017-11-24) the sequencer would always

Re: [PATCH 2/3] sequencer: use run_commit_hook()

2019-10-14 Thread Phillip Wood
Hi Dscho & Junio On 11/10/2019 05:24, Junio C Hamano wrote: > Johannes Schindelin writes: > >>> builtin/commit.c | 22 -- >>> commit.h | 3 --- >>> sequencer.c | 45 ++--- >>> sequencer.h | 2 ++ >>> 4 files changed

Re: [RFC PATCH 2/7] autostash: extract read_one() from rebase

2019-10-18 Thread Phillip Wood
Hi Denton On 16/10/2019 18:26, Denton Liu wrote: Begin the process of lib-ifying the autostash code. In a future commit, this will be used to implement `--autostash` in other builtins. This patch is best viewed with `--color-moved` and `--color-moved-ws=allow-indentation-change`. Signed-off-by

Re: [RFC PATCH 4/7] autostash: extract reset_head() from rebase

2019-10-18 Thread Phillip Wood
Hi Denton It's great to see this being libified, I've had it in mind to do this so we can avoid forking 'git checkout' in sequencer.c On 16/10/2019 18:26, Denton Liu wrote: Begin the process of lib-ifying the autostash code. In a future commit, This patch is best viewed with `--color-moved`

Re: [RFC PATCH 6/7] autostash.c: undefine USE_THE_INDEX_COMPATIBILITY_MACROS

2019-10-18 Thread Phillip Wood
Hi Denton On 16/10/2019 18:26, Denton Liu wrote: Since autostash.c was recently introduced, we should avoid USE_THE_INDEX_COMPATIBILITY_MACROS since we are trying to move away from this in the rest of the codebase. Rewrite the autostash code to not need it and remove its definition. Signed-off-

Re: [RFC PATCH 7/7] merge: teach --autostash option

2019-10-18 Thread Phillip Wood
Hi Denton On 16/10/2019 18:26, Denton Liu wrote: In rebase, one can pass the `--autostash` option to cause the worktree to be automatically stashed before continuing with the rebase. This option is missing in merge, however. It might be helpful to say why this option is useful. I can see one

Re: [PATCH v5 13/17] read-tree: show progress by default

2019-10-21 Thread Phillip Wood
Hi Stolee On 21/10/2019 14:56, Derrick Stolee via GitGitGadget wrote: From: Derrick Stolee The read-tree builtin has a --verbose option that signals to show progress and other data while updating the index. Update this to be on by default when stderr is a terminal window. This will help tools

[PATCH 0/1] add -p: fix checkout -p with pathological context

2019-06-12 Thread Phillip Wood via GitGitGadget
When I fixed the hunk offsets in add -p when hunks are skipped I forgot that the reverse patch case needs to be handled differently. Phillip Wood (1): add -p: fix checkout -p with pathological context git-add--interactive.perl | 6 +- t/t3701-add-interactive.sh | 8 2 files

[PATCH 1/1] add -p: fix checkout -p with pathological context

2019-06-12 Thread Phillip Wood via GitGitGadget
From: Phillip Wood Commit fecc6f3a68 ("add -p: adjust offsets of subsequent hunks when one is skipped", 2018-03-01) fixed adding hunks in the correct place when a previous hunk has been skipped. However it did not address patches that are applied in reverse. In that case we need to

[PATCH 2/3] sequencer: factor out todo command name parsing

2019-06-25 Thread Phillip Wood via GitGitGadget
From: Phillip Wood Factor out the code that parses the name of the command at the start of each line in the todo file into it's own function so that it can be used in the next commit. Signed-off-by: Phillip Wood --- sequencer.c | 19 +-- 1 file changed, 13 insertions(

[PATCH 1/3] sequencer: always allow tab after command name

2019-06-25 Thread Phillip Wood via GitGitGadget
From: Phillip Wood The code that parses the todo list allows an unabbreviated command name to be followed by a space or a tab, but if the command name is abbreviated it only allows a space after it. Fix this inconsistency. Signed-off-by: Phillip Wood --- sequencer.c | 2 +- 1 file changed, 1

[PATCH 3/3] status: do not report errors in sequencer/todo

2019-06-25 Thread Phillip Wood via GitGitGadget
From: Phillip Wood commit 4a72486de9 ("fix cherry-pick/revert status after commit", 2019-04-16) used parse_insn_line() to parse the first line of the todo list to check if it was a pick or revert. However if the todo list is left over from an old cherry-pick or revert and reference

[PATCH 0/3] Wip/quieter sequencer status parsing

2019-06-25 Thread Phillip Wood via GitGitGadget
...@www.fastmail.com/ These patches are based on maint Phillip Wood (3): sequencer: always allow tab after command name sequencer: factor out todo command name parsing status: do not report errors in sequencer/todo sequencer.c| 43 +- t/t7512-status-help.sh

[PATCH v2 1/3] sequencer: always allow tab after command name

2019-06-27 Thread Phillip Wood via GitGitGadget
From: Phillip Wood The code that parses the todo list allows an unabbreviated command name to be followed by a space or a tab, but if the command name is abbreviated it only allows a space after it. Fix this inconsistency. Signed-off-by: Phillip Wood --- sequencer.c | 2 +- 1 file changed, 1

[PATCH v2 0/3] Quieter sequencer status parsing

2019-06-27 Thread Phillip Wood via GitGitGadget
+single character abbreviation before testing if it matches. This +prevents it from matching '\0' as the abbreviated name and then trying +to read another character. + Signed-off-by: Phillip Wood diff --git a/sequencer.c b/sequencer.c

[PATCH v2 2/3] sequencer: factor out todo command name parsing

2019-06-27 Thread Phillip Wood via GitGitGadget
From: Phillip Wood Factor out the code that parses the name of the command at the start of each line in the todo file into its own function so that it can be used in the next commit. As I don't want to burden other callers with having to pass in a pointer to the end of the line the test f

[PATCH v2 3/3] status: do not report errors in sequencer/todo

2019-06-27 Thread Phillip Wood via GitGitGadget
From: Phillip Wood commit 4a72486de9 ("fix cherry-pick/revert status after commit", 2019-04-16) used parse_insn_line() to parse the first line of the todo list to check if it was a pick or revert. However if the todo list is left over from an old cherry-pick or revert and reference

[PATCH 0/1] t3420 remove progress from output

2019-07-01 Thread Phillip Wood via GitGitGadget
Remove ugliness in the tests that check the output of git rebase Based-On: sg/rebase-progress Cc: SZEDER Gábor szeder@gmail.com [szeder@gmail.com] Phillip Wood (1): t3420: remove progress lines before comparing output t/t3420-rebase-autostash.sh | 16 +--- 1 file changed

[PATCH 1/1] t3420: remove progress lines before comparing output

2019-07-01 Thread Phillip Wood via GitGitGadget
From: Phillip Wood Some of the tests check the output of rebase is what we expect. These were added after a regression that added unwanted stash output when using --autostash. They are useful as they prevent unintended changes to the output of the various rebase commands. However they also

[PATCH 1/1] git-prompt: improve cherry-pick/revert detection

2019-07-01 Thread Phillip Wood via GitGitGadget
From: Phillip Wood If the user commits or resets a conflict resolution in the middle of a sequence of cherry-picks or reverts then CHERRY_PICK_HEAD/REVERT_HEAD will be removed and so in the absence of those files we need to check .git/sequencer/todo to see if there is a cherry-pick or revert in

[PATCH 0/1] git-prompt: improve cherry-pick/revert detection

2019-07-01 Thread Phillip Wood via GitGitGadget
Fix the detection of in-progress cherry-picks and reverts when the user commits or resets a conflict resolution in the middle of a sequence of picks/reverts. Phillip Wood (1): git-prompt: improve cherry-pick/revert detection contrib/completion/git-prompt.sh | 37

[PATCH v2 0/1] t3420 remove progress from output

2019-07-04 Thread Phillip Wood via GitGitGadget
Remove ugliness in the tests that check the output of git rebase I've updated this to avoid repeated calls to printf as suggested by Junio Based-On: sg/rebase-progress Phillip Wood (1): t3420: remove progress lines before comparing output t/t3420-rebase-autostash.sh

[PATCH v2 1/1] t3420: remove progress lines before comparing output

2019-07-04 Thread Phillip Wood via GitGitGadget
From: Phillip Wood Some of the tests check the output of rebase is what we expect. These were added after a regression that added unwanted stash output when using --autostash. They are useful as they prevent unintended changes to the output of the various rebase commands. However they also

[PATCH 2/3] rebase -i: check for updated todo after squash and reword

2019-08-19 Thread Phillip Wood via GitGitGadget
From: Phillip Wood While a rebase is stopped for the user to edit a commit message it can be convenient for them to also edit the todo list. The scripted version of rebase supported this but the C version does not. We already check to see if the todo list has been updated by an exec command so

[PATCH 0/3] rebase -i: always update HEAD before rewording

2019-08-19 Thread Phillip Wood via GitGitGadget
This series contains a couple of patches to make the C version of rebase --interactive behave more like the scripted version. The third patch is not strictly related to the first two but is included here to avoid merge conflicts. Phillip Wood (3): rebase -i: always update HEAD before rewording

[PATCH 1/3] rebase -i: always update HEAD before rewording

2019-08-19 Thread Phillip Wood via GitGitGadget
From: Phillip Wood If the user runs git log while rewording a commit it is confusing if sometimes we're amending the commit that's being reworded and at other times we're creating a new commit depending on whether we could fast-forward or not[1]. Fix this inconsistency by always

[PATCH 3/3] sequencer: simplify root commit creation

2019-08-19 Thread Phillip Wood via GitGitGadget
From: Phillip Wood Adapt try_to_commit() to create a new root commit rather than special casing this in run_git_commit(). The significantly reduces the amount of special case code for creating the root commit and reduces the number of commit code paths we have to worry about. Signed-off-by

[PATCH 0/3] sequencer: start running post-commit hook again

2019-10-10 Thread Phillip Wood via GitGitGadget
When I converted the sequencer to avoid forking git commit i forgot about the post-commit hook. These patches are based on pw/rebase-i-show-HEAD-to-reword, otherwise the new test fails as that branch changes the number of commits we make. Phillip Wood (3): sequencer.h fix placement of #endif

[PATCH 3/3] sequencer: run post-commit hook

2019-10-10 Thread Phillip Wood via GitGitGadget
From: Phillip Wood Prior to commit 356ee4659b ("sequencer: try to commit without forking 'git commit'", 2017-11-24) the sequencer would always run the post-commit hook after each pick or revert as it forked `git commit` to create the commit. The conversion to committing

[PATCH 1/3] sequencer.h fix placement of #endif

2019-10-10 Thread Phillip Wood via GitGitGadget
From: Phillip Wood Commit 65850686cf ("rebase -i: rewrite write_basic_state() in C", 2018-08-28) accidentially added new function declarations after the #endif at the end of the include guard. Signed-off-by: Phillip Wood --- sequencer.h | 3 +-- 1 file changed, 1 insertion(+), 2

[PATCH 2/3] sequencer: use run_commit_hook()

2019-10-10 Thread Phillip Wood via GitGitGadget
From: Phillip Wood This simplifies the implementation of run_prepare_commit_msg_hook() and will be used in the next commit. Signed-off-by: Phillip Wood --- builtin/commit.c | 22 -- commit.h | 3 --- sequencer.c | 45

[PATCH v2 1/6] t3404: remove unnecessary subshell

2019-10-15 Thread Phillip Wood via GitGitGadget
From: Phillip Wood Neither of the commands executed in the subshell change any shell variables or the current directory so there is no need for them to be executed in a subshell. Signed-off-by: Phillip Wood --- t/t3404-rebase-interactive.sh | 6 ++ 1 file changed, 2 insertions(+), 4

<    4   5   6   7   8   9   10   >