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

2017-11-24 Thread Phillip Wood
From: Phillip Wood 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 other change is to

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

2017-11-24 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 v4 4/9] commit: move post-rewrite code to libgit

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

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

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

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

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

2017-11-24 Thread Phillip Wood
From: Phillip Wood 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 from lib-submodule-update.s

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

2017-11-24 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 v4 5/9] commit: move print_commit_summary() to libgit

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

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 writes: > >> From: Phillip Wood >> >> Load default values for message cleanup and gpg signing of commits in >> preparation for committing without forking 'git commit'. Note that we >

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 writes: > >> --- a/builtin/rebase--helper.c >> +++ b/builtin/rebase--helper.c >> @@ -9,6 +9,17 @@ static const char * const builtin_rebase_helper_usage[] = { >> NULL >> }; >> >> +s

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 writes: >> >>> --- a/builtin/rebase--helper.c >>> +++ b/builtin/rebase--helper.c >>> @@ -9,6 +9,17 @@ static const char * const buil

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 > wrote: >> From: Phillip Wood >> >> Now that the sequencer creates commits without forking 'git commit' it >> does not see an empty commit in these tests which fixe

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

2017-12-09 Thread Phillip Wood
ed a special fixup merge strategy that somehow took advantage of the DAG to resolve the conflicts by realizing they come from a later commit. However I don't think that could be implemented reliably as sometimes one wants those conflicting lines from the later commit to be moved to the earlier

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 writes: >> >>> --- a/builtin/rebase--helper.c >>> +++ b/builtin/rebase--helper.c >>> @@ -9,6 +9,17 @@ static const char * const buil

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

2017-12-09 Thread Phillip Wood
ess it used a special fixup merge strategy that somehow took advantage of the DAG to resolve the conflicts by realizing they come from a later commit. However I don't think that could be implemented reliably as sometimes one wants those conflicting lines from the later commit to be moved to the earlier

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

2017-12-10 Thread Phillip Wood
On 10/12/17 01:20, Igor Djordjevic wrote: > > Hi Philip, > > On 09/12/2017 20:01, Phillip Wood wrote: >> >>> But thanks for clarifying, anyway, it does feel like `git rebase >>> -i --autosquash` could be smarter in this regards, if `git rebase >>>

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

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

2017-12-11 Thread Phillip Wood
From: Phillip Wood I've reworked the config handling since v4. It now stores the default values in struct replay_opt rather than using global variables and calls git_diff_basic_config(). Unfortunately I've not had time to modify git_gpg_config() to indicate if it successfully handled

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

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

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

2017-12-11 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 v5 5/9] commit: move print_commit_summary() to libgit

2017-12-11 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 v5 6/9] sequencer: simplify adding Signed-off-by: trailer

2017-12-11 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 v5 9/9] t3512/t3513: remove KNOWN_FAILURE_CHERRY_PICK_SEES_EMPTY_COMMIT=1

2017-12-11 Thread Phillip Wood
From: Phillip Wood 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 from lib-submodule-update.s

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

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

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

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

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

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

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

[PATCH] sequencer: improve config handling

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

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

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

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

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

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

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

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

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

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

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

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

2018-01-19 Thread Phillip Wood
On 18/01/18 15:35, Johannes Schindelin wrote: > > This patch is part of the effort to reimplement `--preserve-merges` with > a substantially improved design, a design that has been developed in the > Git for Windows project to maintain the dozens of Windows-specific patch > series on top of upstre

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

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

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

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

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

2017-04-28 Thread Phillip Wood
a script that does 'git -c rebase.instructionFormat= rebase -i' with a custom sequence editor. I can easily add '%s' in the appropriate place but I thought I'd point it out in case other people are affected by the change. Please CC me in any replies as I'm not subscr

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

2018-04-18 Thread Phillip Wood
, which then obviously is a very important piece of data, would > be passed along as required. I'm inclined to agree, though it creates complications if we're going to keep giving commits the same author and committer dates when neither is explicitly specified. Best Wishes Phillip > > -- Hannes

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

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

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

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

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

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

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

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

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

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

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

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

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

2018-04-20 Thread Phillip Wood
if (is_rebase_i(opts) && res < 0) { > - /* Reschedule */ > +reschedule: > advise(_(rescheduled_advice), > get_item_line_length(todo_list, >

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

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

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

2018-04-21 Thread Phillip Wood
ash/fixup in a chain then HEAD has the commit message from the original pick so does not need amending. The first patch could perhaps avoid writing rebase_path_amend_type() in that case by reading the squash message and checking the message count is greater than two. Best Wishes Phillip

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

2018-04-21 Thread Phillip Wood
that would need to be extended to handle 'reset'. Also it currently refuses to overwrite ignored files which is either annoying or safe depending on one's point of view. Best Wishes Phillip merge [-C ] # The parameter in this instance is the *original* merge commit,

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

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

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

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

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

2018-04-23 Thread Phillip Wood
nd I'm not sure it addresses the unnecessary editing of the commit message of the previous commit if a single squash command is skipped as outlined in https://public-inbox.org/git/b6512eae-e214-9699-4d69-77117a0da...@talktalk.net/ Best Wishes Phillip Thanks, Stefan

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

2018-04-25 Thread Phillip Wood
deinitialization string does something unnecessary, like clearing the screen. So with the default setup the output should remain on the screen. Best Wishes Phillip It is not uncommon to request that the output remains visible in the terminal. For this, the option --no-pager can be used. But it

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

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

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

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

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

2018-05-06 Thread Phillip Wood
the 1-indexed column number of the first match on non-context > lines. > + I think it would be useful to explain what the column number actually is so that users know how to consume it. Is it a count of bytes, multi-byte characters or graphemes? It would probably be worth testing with a fil

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

2018-05-06 Thread Phillip Wood
struct commit *commit; > + const char *path = rebase_path_squash_msg(); > + > + if (parse_head(&commit) || > + !(p = get_commit_buffer(commit, NULL)) || > +

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

2018-05-09 Thread Phillip Wood
d', '--not' and '--or'. The man page only uses the word extended when talking about extended regexes. I think something like Print the 1-indexed byte-offset of the first match from the start of the matching line. This option is incompatible with '--invert-match'

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

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

Re: Regression in patch add?

2018-05-10 Thread Phillip Wood
take that into account when recounting patches. I'm about to go off line for a couple of weeks so it will probably be next month before I'm able to put a patch together (assuming Junio agrees we should support broken hunks) Best Wishes Phillip > As a shot in the dark, does yo

Re: Regression in patch add?

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

Re: Regression in patch add?

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

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

2018-05-27 Thread Phillip Wood
in /tmp/a and do cd dir GIT_DIR=/tmp/a/.git git status I get the same result as when running 'git status' from 'git rebase --exec' So I think the problem might have something to do with GIT_DIR being set in the environment when 'git status' is run Best Wis

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

2018-05-31 Thread Phillip Wood
mit them from the first patch - am I missing something? Best Wishes Phillip > Alban Gruin (2): > rebase--interactive: rewrite append_todo_help() in C > sequencer: remove newlines from append_todo_help() messages > > builtin/rebase--helper.c | 10 ++-- > git-rebase--intera

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

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

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

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

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

2018-06-01 Thread Phillip Wood
From: Phillip Wood recount_edited_hunk() introduced in commit 2b8ea7f3c7 ("add -p: calculate offset delta for edited patches", 2018-03-05) required all context lines to start with a space, empty lines are not counted. This was intended to avoid any recounting problems if the user had

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

2017-06-19 Thread Phillip Wood
st. > > The quick fix would be to redirect stderr and stdout independently. > > However, I think it is time for that bug to be fixed: autostash messages > should really go to stderr, just like the rest of them rebase messages. > > I attached the patch, together with the two fixup

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

<    2   3   4   5   6   7   8   9   10   >