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

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

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

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

Re: pw/add-p-select, was Re: What's cooking in git.git (Dec 2018, #01; Sun, 9)

2018-12-10 Thread Phillip Wood
Hi Dscho On 09/12/2018 20:31, Johannes Schindelin wrote: Hi Junio, On Sun, 9 Dec 2018, Junio C Hamano wrote: * pw/add-p-select (2018-07-26) 4 commits - add -p: optimize line selection for short hunks - add -p: allow line selection to be inverted - add -p: select modified lines correctly

Re: [PATCH v3 06/16] sequencer: refactor sequencer_add_exec_commands() to work on a todo_list

2018-12-10 Thread Phillip Wood
On 30/11/2018 19:06, Johannes Schindelin wrote: Hi, On Fri, 30 Nov 2018, Phillip Wood wrote: diff --git a/sequencer.c b/sequencer.c index 900899ef20..11692d0b98 100644 --- a/sequencer.c +++ b/sequencer.c @@ -4394,24 +4394,29 @@ int sequencer_make_script(FILE *out, int argc, const char **argv

Re: A case where diff.colorMoved=plain is more sensible than diff.colorMoved=zebra & others

2018-12-10 Thread Phillip Wood
On 06/12/2018 18:11, Stefan Beller wrote: On Thu, Dec 6, 2018 at 6:58 AM Phillip Wood wrote: So is there some "must be at least two consecutive lines" condition for not-plain, or is something else going on here? To be considered a block has to have 20 alphanumeric characters -

Re: pw/add-p-select, was Re: What's cooking in git.git (Dec 2018, #01; Sun, 9)

2018-12-11 Thread Phillip Wood
Hi Dscho and Slavica On 11/12/2018 09:56, Johannes Schindelin wrote: Hi Phillip, [Cc:ing Slavica, the Outreachy intern working on converting `add -i` to a built-in] On Mon, 10 Dec 2018, Phillip Wood wrote: On 09/12/2018 20:31, Johannes Schindelin wrote: (which I take as being

Re: [PATCH v2 0/9] diff --color-moved-ws fixes and enhancment

2019-01-08 Thread Phillip Wood
Hi Junio I just wanted to check that these patches are on your radar as they haven't made it into pu yet. Best Wishes for the New Year Phillip On 23/11/2018 11:16, Phillip Wood wrote: From: Phillip Wood Thanks to Stefan for his feedback on v1. I've updated patches 2 & 8

Re: [PATCH 5/7] add-interactive.c: implement show-help command

2019-01-14 Thread Phillip Wood
Hi Slavica I think the basics of this patch are fine, I've got a few comments below On 20/12/2018 12:09, Slavica Djukic via GitGitGadget wrote: > From: Slavica Djukic > > Implement show-help command in add-interactive.c and use it in > builtin add--helper.c. > > Use command name "show-help" in

Re: [PATCH 6/7] Git.pm: introduce environment variable GIT_TEST_PRETEND_TTY

2019-01-14 Thread Phillip Wood
Hi Salvica/Johannes On 20/12/2018 12:09, Slavica Djukic via GitGitGadget wrote: > From: Slavica Djukic > > To enable testing the colored output on Windows, enable TTY > by using environment variable GIT_TEST_PRETEND_TTY. > > This is the original idea by Johannes Schindelin. I normally use GIT_

Re: [PATCH 7/7] add--interactive.perl: use add--helper --show-help for help_cmd

2019-01-14 Thread Phillip Wood
Hi Slavica On 20/12/2018 12:09, Slavica Djukic via GitGitGadget wrote: > From: Slavica Djukic > > Change help_cmd sub in git-add--interactive.perl to use > show-help command from builtin add--helper. > > Add test to t3701-add-interactive to verify that show-help > outputs expected content. Use

[PATCH] technical doc: add a design doc for the evolve command

2019-01-15 Thread Phillip Wood
Hi Stefan Sorry for the delay in replying to your message, Christmas and the New Year got in the way. On 20/11/2018 20:19, Stefan Xenos wrote: >> This explains why we have 'origin' fields in the meta commits, it might >> be worth putting a forward reference or note earlier on to explain why >> re

Re: [PATCH 6/7] Git.pm: introduce environment variable GIT_TEST_PRETEND_TTY

2019-01-15 Thread Phillip Wood
On 15/01/2019 13:50, Johannes Schindelin wrote: Hi Phillip, On Mon, 14 Jan 2019, Phillip Wood wrote: Hi Salvica/Johannes Close ;-) Sorry Slavica On 20/12/2018 12:09, Slavica Djukic via GitGitGadget wrote: From: Slavica Djukic To enable testing the colored output on Windows, enable

Re: Broken interactive rebase text after some UTF-8 characters

2019-01-16 Thread Phillip Wood
Dear Michal Thanks for the bug report, unfortunately I'm unable to reproduce it here using git 2.20.1 (see below). Knowing a little about how the todo list is created I cannot think how multibyte characters would break it. What command line were you using to start the rebase? Best Wishes Ph

Re: Broken interactive rebase text after some UTF-8 characters

2019-01-17 Thread Phillip Wood
n try myself to gather more information. Should you want to reproduce this on OpenIndiana on your own, Vagrant is the more straightforward way to deploy OpenIndiana. Thanks, Michal On 01/16/19 11:33 AM, Phillip Wood wrote: Dear Michal Thanks for the bug report, unfortunately I'm unable to

Re: [PATCH v2 5/7] add-interactive.c: implement show-help command

2019-01-18 Thread Phillip Wood
Hi Slavica I think this round is looking good I've got a couple of comments about the translation of the help text but everything else looks fine to me now. In future when you're posting a new version it's helpful CC the people who commented on the previous version(s). On 18/01/2019 07:47, Slavic

Re: [PATCH v2 6/7] t3701-add-interactive: test add_i_show_help()

2019-01-18 Thread Phillip Wood
Hi Slavica Thanks for moving this up, it's really good to add the test before the conversion to C. Best Wishes Phillip On 18/01/2019 07:47, Slavica Djukic via GitGitGadget wrote: > From: Slavica Djukic > > Add test to t3701-add-interactive to verify that add_i_show_help() > outputs expected c

Re: [PATCH v2 5/7] add-interactive.c: implement show-help command

2019-01-18 Thread Phillip Wood
Hi Slavica On 18/01/2019 12:19, Slavica Đukić wrote: Hi Phillip, On 18-Jan-19 12:20 PM, Phillip Wood wrote: Hi Slavica I think this round is looking good I've got a couple of comments about the translation of the help text but everything else looks fine to me now. In future when y

Re: [PATCH v4 03/16] sequencer: remove the 'arg' field from todo_item

2019-01-21 Thread Phillip Wood
Hi Alban I think this is a good change, I just wonder if it would be better to have an accessor function to get the arg pointer from a todo list item see below On 29/12/2018 16:04, Alban Gruin wrote: The 'arg' field of todo_item used to store the address of the first byte of the parameter of

Re: pw/add-p-select, was Re: What's cooking in git.git (Dec 2018, #01; Sun, 9)

2019-01-22 Thread Phillip Wood
Hi Dscho On 21/01/2019 20:58, Johannes Schindelin wrote: Hi Phillip, On Tue, 11 Dec 2018, Phillip Wood wrote: On 11/12/2018 09:56, Johannes Schindelin wrote: On Mon, 10 Dec 2018, Phillip Wood wrote: On 09/12/2018 20:31, Johannes Schindelin wrote: I could imagine, however, that it

Re: [PATCH v3 6/7] t3701-add-interactive: test add_i_show_help()

2019-01-25 Thread Phillip Wood
Hi Slavica Having suggested that you move this patch up the series, I thought I should check that it does actually pass before the rewrite. Unfortunately when I run it it fails, but it is due to a missing trailing space in the expected file. I get --- expect 2019-01-25 10:42:06.794251740 +00

[PATCH] rebase -x: sanity check command

2019-01-28 Thread Phillip Wood
From: Phillip Wood If the user gives an empty argument to --exec then the rebase starts to run before erroring out with error: missing arguments for exec error: invalid line 2: exec You can fix this with 'git rebase --edit-todo' and then run 'git rebase --continue'

[PATCH] implicit interactive rebase: don't run sequence editor

2019-01-28 Thread Phillip Wood
From: Phillip Wood If GIT_SEQUENCE_EDITOR is set then rebase runs it when executing implicit interactive rebases which are supposed to appear non-interactive to the user. Fix this by setting GIT_SEQUENCE_EDITOR=: rather than GIT_EDITOR=:. A couple of tests relied on the old behavior so they are

Re: [PATCH] rebase -x: sanity check command

2019-01-29 Thread Phillip Wood
Hi Dscho On 28/01/2019 22:03, Johannes Schindelin wrote: > Hi Phillip, > > On Mon, 28 Jan 2019, Phillip Wood wrote: > >> From: Phillip Wood >> >> If the user gives an empty argument to --exec then the rebase starts to >> run before erroring out with >&

Re: [PATCH] rebase -x: sanity check command

2019-01-29 Thread Phillip Wood
Dear Junio & Dscho On 28/01/2019 21:56, Johannes Schindelin wrote: > Hi Junio, > > On Mon, 28 Jan 2019, Junio C Hamano wrote: > >> Phillip Wood writes: >> >>> From: Phillip Wood >>> >>> If the user gives an empty argument to --exec the

[PATCH v2] rebase -x: sanity check command

2019-01-29 Thread Phillip Wood
From: Phillip Wood If the user gives an empty argument to --exec then git creates a todo list that it cannot parse. The rebase starts to run before erroring out with error: missing arguments for exec error: invalid line 2: exec You can fix this with 'git rebase --edit-todo' an

Re: [PATCH v6 07/16] sequencer: refactor sequencer_add_exec_commands() to work on a todo_list

2019-01-31 Thread Phillip Wood
Hi Alban On 29/01/2019 15:01, Alban Gruin wrote: This refactors sequencer_add_exec_commands() to work on a todo_list to avoid redundant reads and writes to the disk. Instead of inserting the `exec' commands between the other commands and re-parsing the buffer at the end, they are appended to th

Re: Broken interactive rebase text after some UTF-8 characters

2019-01-31 Thread Phillip Wood
Hi Alban On 31/01/2019 17:43, Alban Gruin wrote: Hi Phillip and Michal, I think I found the bug. Good find! Which os are you on? If you look at .git/rebase-merge/git-rebase-todo.backup, which is created before the editor is opened, you can see that it does not have this problem. In between

Re: [PATCH v6 07/16] sequencer: refactor sequencer_add_exec_commands() to work on a todo_list

2019-01-31 Thread Phillip Wood
Hi Alban On 31/01/2019 20:37, Alban Gruin wrote: Hi Phillip, Le 31/01/2019 à 15:30, Phillip Wood a écrit : Hi Alban On 29/01/2019 15:01, Alban Gruin wrote: This refactors sequencer_add_exec_commands() to work on a todo_list to avoid redundant reads and writes to the disk. Instead of

Re: [PATCH v6 14/16] rebase-interactive: rewrite edit_todo_list() to handle the initial edit

2019-02-01 Thread Phillip Wood
Hi Alban This looks good apart from some missing error handling. On 29/01/2019 15:01, Alban Gruin wrote: edit_todo_list() is changed to work on a todo_list, and to handle the initial edition of the todo list (ie. making a backup of the todo list). It does not check for dropped commits yet, as

Re: [PATCH v6 16/16] rebase--interactive: move transform_todo_file() to rebase--interactive.c

2019-02-01 Thread Phillip Wood
Hi Alban On 29/01/2019 15:01, Alban Gruin wrote: As transform_todo_file() is only needed inside of rebase--interactive.c, it is moved there from sequencer.c. I think I'd prefer to minimize the code under builtin and move this to rebase-interactive.c when it is modified earlier in the series.

Re: [PATCH v4 0/7] Turn git add-i into built-in

2019-02-01 Thread Phillip Wood
n earlier     tests Cc: Phillip Wood phillip.w...@dunelm.org.uk [phillip.w...@dunelm.org.uk] Daniel Ferreira (4):    diff: export diffstat interface    add--helper: create builtin helper for interactive add    add-interactive.c: implement status command    add--interactive.perl: use add--helper --statu

Re: [PATCH v6 07/16] sequencer: refactor sequencer_add_exec_commands() to work on a todo_list

2019-02-01 Thread Phillip Wood
On 31/01/2019 14:30, Phillip Wood wrote: Hi Alban On 29/01/2019 15:01, Alban Gruin wrote: This refactors sequencer_add_exec_commands() to work on a todo_list to avoid redundant reads and writes to the disk. Instead of inserting the `exec' commands between the other commands and re-parsin

Re: [PATCH v3 10/21] checkout: split part of it to new command 'switch'

2019-03-28 Thread Phillip Wood
On 28/03/2019 11:04, Duy Nguyen wrote: On Wed, Mar 27, 2019 at 5:24 PM Phillip Wood wrote: On 26/03/2019 15:48, Elijah Newren wrote: On Tue, Mar 26, 2019 at 8:24 AM Duy Nguyen wrote: On Tue, Mar 26, 2019 at 10:01 PM Elijah Newren wrote: Yeah.. --ignore-in-process does not necessarily

Re: [PATCH v3 10/21] checkout: split part of it to new command 'switch'

2019-03-29 Thread Phillip Wood
Hi Elijah On 28/03/2019 17:39, Elijah Newren wrote: Hi Phillip, On Thu, Mar 28, 2019 at 9:23 AM Phillip Wood wrote: On 28/03/2019 11:04, Duy Nguyen wrote: On Wed, Mar 27, 2019 at 5:24 PM Phillip Wood wrote: On 26/03/2019 15:48, Elijah Newren wrote: On Tue, Mar 26, 2019 at 8:24 AM Duy

[PATCH] sequencer: fix cleanup with --signoff and -x

2019-03-29 Thread Phillip Wood
From: Phillip Wood Before commit 356ee4659b ("sequencer: try to commit without forking 'git commit'", 2017-11-24) when --signoff or -x were given on the command line the commit message was cleaned up with --cleanup=space or commit.cleanup if it was set. Unfortunately this be

[PATCH 0/2] A couple of cherry-pick related fixes

2019-03-29 Thread Phillip Wood
From: Phillip Wood See the actual patches for a description of the fixes, I'm not sure about the second one, see the notes on it. I'm going to be mostly off-line for the next couple of weeks so it might take me a while to respond to any comments. Phillip Wood (2): commit/reset: tr

[PATCH 2/2] fix cherry-pick/revert status after commit

2019-03-29 Thread Phillip Wood
From: Phillip Wood If the user commits a conflict resolution using 'git commit' during a sequence of picks then 'git status' missed the fact that a cherry-pick/revert is still in progress. Signed-off-by: Phillip Wood --- Notes: I'm not user about printing the o

[PATCH 1/2] commit/reset: try to clean up sequencer state

2019-03-29 Thread Phillip Wood
From: Phillip Wood When cherry-picking or reverting a sequence of commits and if the final pick/revert has conflicts and the user uses `git commit` to commit the conflict resolution and does not run `git cherry-pick --continue` then the sequencer state is left behind. This can cause problems

Re: [PATCH 1/2] commit/reset: try to clean up sequencer state

2019-04-08 Thread Phillip Wood
Hi Junio On 01/04/2019 09:28, Junio C Hamano wrote: Phillip Wood writes: From: Phillip Wood When cherry-picking or reverting a sequence of commits and if the final pick/revert has conflicts and the user uses `git commit` to commit the conflict resolution and does not run `git cherry-pick

Re: [PATCH 2/2] fix cherry-pick/revert status after commit

2019-04-08 Thread Phillip Wood
On 01/04/2019 09:34, Junio C Hamano wrote: Phillip Wood writes: From: Phillip Wood If the user commits a conflict resolution using 'git commit' during a sequence of picks then 'git status' missed the fact that a cherry-pick/revert is still in progress. How well woul

Re: [PATCH 1/2] commit/reset: try to clean up sequencer state

2019-04-08 Thread Phillip Wood
On 01/04/2019 11:09, Duy Nguyen wrote: On Fri, Mar 29, 2019 at 11:32 PM Phillip Wood wrote: From: Phillip Wood When cherry-picking or reverting a sequence of commits and if the final pick/revert has conflicts and the user uses `git commit` to commit the conflict resolution and does not run

Re: What's cooking in git.git (Apr 2019, #02; Wed, 10)

2019-04-10 Thread Phillip Wood
On 09/04/2019 19:08, Junio C Hamano wrote: Here are the topics that have been cooking. Commits prefixed with '-' are only in 'pu' (proposed updates) while commits prefixed with '+' are in 'next'. The ones marked with '.' do not appear in any of the integration branches, but I am still holding o

Re: [RFC PATCH 08/11] rebase -i: use struct rebase_options to parse args

2019-04-10 Thread Phillip Wood
Hi Alban sorry for the slow reply, I think you're probably off-list for a while by now On 21/03/2019 21:13, Alban Gruin wrote: Hi Phillip, It’s nice to see your work on this on the list. Le 19/03/2019 à 20:03, Phillip Wood a écrit : From: Phillip Wood In order to run `rebase -i` wi

Re: [BUG] rebase --interactive silently overwrites ignored files

2019-04-12 Thread Phillip Wood
Hi On 12/04/2019 00:56, wh wrote: I'm using git 2.20.1 from Debian. Git is usually careful not to overwrite untracked files, including ignored files. Git normally overwrites ignored files, so I think in your example rebase -i is working as expected, I'm surprised that the am based rebase does

Re: [BUG] rebase --interactive silently overwrites ignored files

2019-04-14 Thread Phillip Wood
try and take a look at what's going sometime in the not too distant future. Best Wishes Phillip [1] https://public-inbox.org/git/cacsjy8aez-lz6zgesunukvphb9tta9fac1gk05fhnie2xtf...@mail.gmail.com/T/#u On Fri, Apr 12, 2019 at 9:30 AM Phillip Wood wrote: Hi On 12/04/2019 00:56, wh wrote:

[PATCH v2 2/2] fix cherry-pick/revert status after commit

2019-04-16 Thread Phillip Wood
From: Phillip Wood If the user commits a conflict resolution using `git commit` in the middle of a sequence of cherry-picks/reverts then `git status` missed the fact that a cherry-pick/revert is still in progress. Signed-off-by: Phillip Wood --- sequencer.c| 35

[PATCH v2 0/2] A couple of cherry-pick related fixes

2019-04-16 Thread Phillip Wood
From: Phillip Wood I've updated the first patch as per Junio's suggestions and added tests for revert as well as cherry-pick. I've also changed the second patch to avoid printing the oid of the origin of the commit that's just been created and added tests for revert as wel

[PATCH v2 1/2] commit/reset: try to clean up sequencer state

2019-04-16 Thread Phillip Wood
From: Phillip Wood When cherry-picking or reverting a sequence of commits and if the final pick/revert has conflicts and the user uses `git commit` to commit the conflict resolution and does not run `git cherry-pick --continue` then the sequencer state is left behind. This can cause problems

Re: [PATCH v5 3/5] rebase: fast-forward --onto in more cases

2019-04-16 Thread Phillip Wood
Hi Denton It's good to see rebase fast-forwarding properly when it should On 15/04/2019 23:29, Denton Liu wrote: Before, when we had the following graph, A---B---C (master) \ D (side) running 'git rebase --onto master... master side' would result in D being al

Re: What's cooking in git.git (Apr 2019, #03; Tue, 16)

2019-04-17 Thread Phillip Wood
On 16/04/2019 15:51, Ævar Arnfjörð Bjarmason wrote: On Tue, Apr 16 2019, Junio C Hamano wrote: * pw/rebase-i-internal-rfc (2019-03-21) 12 commits - rebase -i: run without forking rebase--interactive - rebase: use a common action enum - rebase -i: use struct rebase_options in do_interacti

[PATCH v10 09/10] sequencer.c: save and restore cleanup mode

2019-04-17 Thread Phillip Wood
From: Denton Liu If the user specifies an explicit cleanup mode then save and restore it so that it is preserved by 'git cherry-pick --continue'. Signed-off-by: Phillip Wood --- sequencer.c | 28 +++- 1 file changed, 27 insertions(+), 1 deletion(-) di

[PATCH v10 07/10] merge: cleanup messages like commit

2019-04-17 Thread Phillip Wood
that messages are properly cleaned up. Note that some newlines that were added to the commit message were removed so that if a file were read via -F, it would be copied faithfully. Helped-by: Eric Sunshine Signed-off-by: Phillip Wood Signed-off-by: Denton Liu --- Documentation/merge-options.txt

[PATCH v10 01/10] t7600: clean up style

2019-04-17 Thread Phillip Wood
From: Denton Liu Clean up the 'merge --squash c3 with c7' test by removing some unnecessary braces and removing a pipe. Also, generally cleanup style by unindenting a here-doc, removing stray spaces after a redirection operator and allowing sed to open its own input instead of redirecting input

[PATCH v10 10/10] cherry-pick/revert: add scissors line on merge conflict

2019-04-17 Thread Phillip Wood
From: Denton Liu Fix a bug where the scissors line is placed after the Conflicts: section, in the case where a merge conflict occurs and commit.cleanup = scissors. Helped-by: Phillip Wood Signed-off-by: Denton Liu --- Documentation/git-cherry-pick.txt | 7 +++ Documentation/git-revert.txt

[PATCH v10 05/10] commit: extract cleanup_mode functions to sequencer

2019-04-17 Thread Phillip Wood
From: Denton Liu Signed-off-by: Denton Liu --- builtin/commit.c | 25 ++--- sequencer.c | 29 + sequencer.h | 6 ++ 3 files changed, 37 insertions(+), 23 deletions(-) diff --git a/builtin/commit.c b/builtin/commit.c index f17537474

[PATCH v10 06/10] parse-options.h: extract common --cleanup option

2019-04-17 Thread Phillip Wood
From: Denton Liu The --cleanup option is commonly used. Extract it so that its definition is not repeated. Helped-by: Phillip Wood Signed-off-by: Denton Liu --- builtin/commit.c | 2 +- builtin/tag.c| 3 +-- parse-options.h | 1 + 3 files changed, 3 insertions(+), 3 deletions(-) diff

[PATCH v10 08/10] merge: add scissors line on merge conflict

2019-04-17 Thread Phillip Wood
From: Denton Liu This fixes a bug where the scissors line is placed after the Conflicts: section, in the case where a merge conflict occurs and commit.cleanup = scissors. Next, if commit.cleanup = scissors is specified, don't produce a scissors line in commit if one already exists in the MERGE_M

[PATCH v10 02/10] t3507: clean up style

2019-04-17 Thread Phillip Wood
From: Denton Liu Remove space after redirection operators for style. Also, remove a git command which was upstream of a pipe. Finally, let grep and sed open their own input instead of letting the shell redirect the input. Helped-by: SZEDER Gábor Signed-off-by: Denton Liu --- t/t3507-cherry-pi

[PATCH v10 04/10] t7502: clean up style

2019-04-17 Thread Phillip Wood
From: Denton Liu Refactor out Git commands that were upstream of a pipe. Remove spaces after "> ". Indent here-docs appropriately. Convert echo chains to use the test_write_lines function. Refactor 'sign off' test to use test_cmp instead of comparing variables. Helped-by: Eric Sunshine Helped-b

[PATCH v10 00/10] Fix scissors bug during conflict

2019-04-17 Thread Phillip Wood
From: Phillip Wood With Denton's blessing I've rebased his patches on top of my patch to fix the message cleanup with cherry-pick --signoff and -x [1]. I've also refactored a couple of the patches and cleaned up the coding style in places. The refactoring aims to simplify the

[PATCH v10 03/10] t7604: clean up style

2019-04-17 Thread Phillip Wood
From: Denton Liu Before, we had some Git commands which were upstream of the pipe. This meant that if it produced an error, it would've gone unnoticed. Refactor to place Git commands on their own. Also, while we're at it, remove spaces after redirection operators. Helped-by: Eric Sunshine Help

Re: [PATCH v5 3/5] rebase: fast-forward --onto in more cases

2019-04-17 Thread Phillip Wood
On 17/04/2019 07:44, Denton Liu wrote: On Tue, Apr 16, 2019 at 02:59:12PM +0100, Phillip Wood wrote: Hi Denton It's good to see rebase fast-forwarding properly when it should On 15/04/2019 23:29, Denton Liu wrote: Before, when we had the following graph, A---B---C (m

[PATCH v1 00/12] Run rebase -i without forking rebase--interactive

2019-04-17 Thread Phillip Wood
From: Phillip Wood Thanks for the feedback on the last version. I've updated the final commit message to mention the speed up reported by Ævar. I've also removed the translation of the trace strings. Apart from that this series is unchanged. There shouldn't be any merge con

[PATCH v1 01/12] sequencer: always discard index after checkout

2019-04-17 Thread Phillip Wood
From: Phillip Wood As the checkout runs in a separate process our index will be out of date so it should be discarded. The existing callers are not doing this consistently so do it here to avoid the callers having to worry about it. This fixes some test failures that happen if

[PATCH v1 02/12] rebase: don't translate trace strings

2019-04-17 Thread Phillip Wood
From: Phillip Wood commit b3a5d5a80c ("trace2:data: add subverb for rebase", 2019-02-22) mistakenly marked the subverb names for translation and unnecessarily NULL terminated the array. Signed-off-by: Phillip Wood --- builtin/rebase.c | 15 +++ 1 file changed, 7 insert

[PATCH v1 03/12] rebase: rename write_basic_state()

2019-04-17 Thread Phillip Wood
From: Phillip Wood This clashes with a function in sequencer.c Signed-off-by: Phillip Wood --- builtin/rebase.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builtin/rebase.c b/builtin/rebase.c index 239a54ecfe..0b1a193a8e 100644 --- a/builtin/rebase.c +++ b/builtin

[PATCH v1 04/12] rebase: use OPT_RERERE_AUTOUPDATE()

2019-04-17 Thread Phillip Wood
From: Phillip Wood As we have a macro for this it makes sense to use it. Having cmd_rebase() and cmd_rebase__interactive() use the same values for this option will be helpful when we start running interactive rebases without forking rebase--interactive. Signed-off-by: Phillip Wood --- builtin

[PATCH v1 05/12] rebase -i: combine rebase--interactive.c with rebase.c

2019-04-17 Thread Phillip Wood
From: Phillip Wood In order to run `rebase -i` without forking `rebase--interactive` it will be convenient to have all the code from rebase--interactive.c in rebase.c. This is a straight forward copy of the code from rebase--interactive.c, it will be simplified slightly in the next commit

[PATCH v1 06/12] rebase -i: remove duplication

2019-04-17 Thread Phillip Wood
From: Phillip Wood path_state_dir() and merge_dir() refer to the same path so remove one of them. Signed-off-by: Phillip Wood --- builtin/rebase.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/builtin/rebase.c b/builtin/rebase.c index 57a3c9caf1..610b67827b 100644

[PATCH v1 09/12] rebase -i: use struct rebase_options to parse args

2019-04-17 Thread Phillip Wood
From: Phillip Wood In order to run `rebase -i` without forking `rebase--interactive` it will be convenient to use the same structure when parsing the options in cmd_rebase() and cmd_rebase__interactive(). Signed-off-by: Phillip Wood --- builtin/rebase.c | 203

[PATCH v1 12/12] rebase -i: run without forking rebase--interactive

2019-04-17 Thread Phillip Wood
From: Phillip Wood When the builtin rebase starts an interactive rebase it parses the options and then repackages them and forks `rebase--interactive`. Separate the option parsing in cmd_rebase__interactive() from the business logic to allow interactive rebases can be run without forking

[PATCH v1 11/12] rebase: use a common action enum

2019-04-17 Thread Phillip Wood
From: Phillip Wood cmd_rebase() and cmd_rebase__interactive() used different enums to hold the current action. Change to using a common enum so the values are the same when we change `rebase -i` to avoid forking `rebase--interactive`. Signed-off-by: Phillip Wood --- builtin/rebase.c | 91

[PATCH v1 07/12] rebase -i: use struct commit when parsing options

2019-04-17 Thread Phillip Wood
From: Phillip Wood This is in preparation for using `struct rebase_options` when parsing options in cmd_rebase__interactive(). Using a string for onto, restrict_revision and upstream, was a hangover from the scripted version of rebase. The functions that use these variables are updated to take a

[PATCH v1 08/12] rebase -i: use struct object_id for squash_onto

2019-04-17 Thread Phillip Wood
From: Phillip Wood More preparation for using `struct rebase_options` in cmd_rebase__interactive(). Using a string was a hangover from the scripted version of rebase, update the functions that use `squash_onto` to take a `sturct object_id`. Signed-off-by: Phillip Wood --- builtin/rebase.c

[PATCH v1 10/12] rebase -i: use struct rebase_options in do_interactive_rebase()

2019-04-17 Thread Phillip Wood
From: Phillip Wood All the parameters that are passed to do_interactive_rebase() apart from `flags` are already in `struct rebase_options` so there is no need to pass them separately. Signed-off-by: Phillip Wood --- builtin/rebase.c | 69 +--- 1

Re: Generating a todo file for non-interactive rebasing

2019-04-17 Thread Phillip Wood
Hi Drew On 16/04/2019 16:37, Drew DeVault wrote: Hiya! Whenever I do a particularly long rebase on a branch, sorting out conflicts from upstream, I find that it's often useful to have the additional context that you get during an interactive rebase, such as recent commands run, commands planned

Re: [PATCH v2 1/2] commit/reset: try to clean up sequencer state

2019-04-17 Thread Phillip Wood
Hi Dscho On 17/04/2019 13:26, Johannes Schindelin wrote: Hi, On Wed, 17 Apr 2019, Junio C Hamano wrote: Phillip Wood writes: Avoid this potential problem by removing the sequencer state if we're committing or resetting the final pick in a sequence. The use-case story before

Re: [PATCH v10 09/10] sequencer.c: save and restore cleanup mode

2019-04-17 Thread Phillip Wood
Hi Denton On 17/04/2019 18:02, Denton Liu wrote: On Wed, Apr 17, 2019 at 11:23:29AM +0100, Phillip Wood wrote: From: Denton Liu We should drop this line before applying the patch since Phillip did all of the hard work for this patch and he's the primary author. If the user specifi

Re: [PATCH v6 4/6] rebase: fast-forward --onto in more cases

2019-04-17 Thread Phillip Wood
so that a rebase is forced. While we're at it, remove a trailing whitespace from rebase.c. Helped-by: Phillip Wood Signed-off-by: Denton Liu --- builtin/rebase.c | 28 +++- t/t3400-rebase.sh | 2 +- t/t3404-rebase-interactive.sh |

Re: [PATCH v10 00/10] Fix scissors bug during conflict

2019-04-18 Thread Phillip Wood
On 18/04/2019 06:19, Junio C Hamano wrote: Phillip Wood writes: From: Phillip Wood With Denton's blessing I've rebased his patches on top of my patch to fix the message cleanup with cherry-pick --signoff and -x [1]. I've Note that the base is a merge of that patch (which is

Re: [PATCH/RFC 0/2] rebase: add switches to control todo-list setup

2019-04-22 Thread Phillip Wood
On 22/04/2019 02:13, Junio C Hamano wrote: Phil Hord writes: Currently it supports these switches: usage: git rebase [-i] [options] [--exec ] ... : --break stop before the mentioned ref --drop drop the mentioned ref from the todo list --edit edit the

Re: [PATCH v2] Give git-pull a --reset option

2019-04-22 Thread Phillip Wood
On 22/04/2019 00:38, Junio C Hamano wrote: "brian m. carlson" writes: It may be helpful to point out that this is essentially the workflow I had ... I'm not sure if this email is an argument for or against this option, but maybe it provides some helpful perspective. I think you and Philli

Re: [PATCH 3/5] sequencer: add support for multiple hooks

2019-04-24 Thread Phillip Wood
On 24/04/2019 01:49, brian m. carlson wrote: > Add support for multiple post-rewrite hooks, both for "git commit > --amend" and "git rebase". > > Additionally add support for multiple prepare-commit-msg hooks. > > Signed-off-by: brian m. carlson > --- > builtin/am.c | 28 +

Re: [PATCH 0/5] Multiple hook support

2019-04-24 Thread Phillip Wood
On 24/04/2019 09:10, Ævar Arnfjörð Bjarmason wrote: > > On Wed, Apr 24 2019, brian m. carlson wrote: > >> Oftentimes, people want to use multiple of the same kind of hook. This >> may be because software or a project they use requires a given hook, but >> they would also like to have a custom hoo

Re: [PATCH v6 15/27] switch: add --discard-changes

2019-04-25 Thread Phillip Wood
On 29/03/2019 10:39, Nguyễn Thái Ngọc Duy wrote: > --discard-changes is a better name than --force for this option since > it's what really happens. I didn't realize when I suggested the name that --force overwrites untracked files as well as discarding changes from tracked files. I think we shoul

Re: [PATCH v3 10/21] checkout: split part of it to new command 'switch'

2019-04-25 Thread Phillip Wood
Hi Elijah Sorry it's taken me so long to reply to this - I'm not sure where the last few weeks have gone. On 29/03/2019 15:35, Elijah Newren wrote: > Hi Phillip, > > On Fri, Mar 29, 2019 at 4:04 AM Phillip Wood > wrote: >> On 28/03/2019 17:39, Elijah Newren wrote:

Re: [PATCH v6 23/27] switch: reject if some operation is in progress

2019-04-25 Thread Phillip Wood
On 29/03/2019 10:39, Nguyễn Thái Ngọc Duy wrote: > Unless you know what you're doing, switching to another branch to do > something then switching back could be confusing. Worse, you may even > forget that you're in the middle of something. By the time you realize, > you may have done a ton of work

Re: [PATCH 3/5] sequencer: add support for multiple hooks

2019-04-25 Thread Phillip Wood
On 24/04/2019 23:46, brian m. carlson wrote: On Wed, Apr 24, 2019 at 10:51:56AM +0100, Phillip Wood wrote: On 24/04/2019 01:49, brian m. carlson wrote: Add support for multiple post-rewrite hooks, both for "git commit --amend" and "git rebase". Additionally add support

Re: [PATCH v1 02/12] rebase: don't translate trace strings

2019-04-25 Thread Phillip Wood
On 19/04/2019 06:53, Junio C Hamano wrote: > Phillip Wood writes: > >> From: Phillip Wood >> >> commit b3a5d5a80c ("trace2:data: add subverb for rebase", 2019-02-22) >> mistakenly marked the subverb names for translation and unnecessarily >>

[PATCH] rebase --abort: cleanup refs/rewritten

2019-04-26 Thread Phillip Wood
From: Phillip Wood When `rebase -r` finishes it removes any refs under refs/rewritten that it has created. However if the rebase is aborted these refs are not removed. This can cause problems for future rebases. For example I recently wanted to merge a updated version of a topic branch into an

[PATCH] rebase -r: always reword merge -c

2019-04-26 Thread Phillip Wood
From: Phillip Wood If a merge can be fast-forwarded then make sure that we still edit the commit message if the user specifies -c. The implementation follows the same pattern that is used for ordinary rewords that are fast-forwarded. Signed-off-by: Phillip Wood --- sequencer.c

Re: [PATCH v6 23/27] switch: reject if some operation is in progress

2019-04-29 Thread Phillip Wood
On 29/04/2019 10:16, Duy Nguyen wrote: On Thu, Apr 25, 2019 at 5:33 PM Phillip Wood wrote: On 29/03/2019 10:39, Nguyễn Thái Ngọc Duy wrote: Unless you know what you're doing, switching to another branch to do something then switching back could be confusing. Worse, you may even forget

Re: [PATCH v6 15/27] switch: add --discard-changes

2019-04-29 Thread Phillip Wood
On 25/04/2019 11:12, Duy Nguyen wrote: On Thu, Apr 25, 2019 at 5:02 PM Phillip Wood wrote: On 29/03/2019 10:39, Nguyễn Thái Ngọc Duy wrote: --discard-changes is a better name than --force for this option since it's what really happens. I didn't realize when I suggested the

Re: [PATCH] rebase --abort: cleanup refs/rewritten

2019-04-30 Thread Phillip Wood
Hi Dscho On 29/04/2019 17:07, Johannes Schindelin wrote: Hi Phillip, On Fri, 26 Apr 2019, Phillip Wood wrote: From: Phillip Wood When `rebase -r` finishes it removes any refs under refs/rewritten that it has created. However if the rebase is aborted these refs are not removed. This can

Re: [PATCH] rebase -r: always reword merge -c

2019-04-30 Thread Phillip Wood
Hi Dscho On 29/04/2019 17:14, Johannes Schindelin wrote: Hi Phillip, On Fri, 26 Apr 2019, Phillip Wood wrote: From: Phillip Wood If a merge can be fast-forwarded then make sure that we still edit the commit message if the user specifies -c. The implementation follows the same pattern that

Re: [PATCH v2] status: add an empty line when there is no hint

2019-04-30 Thread Phillip Wood
Hi John On 30/04/2019 07:02, John Lin wrote: When typing "git status", there is an empty line between the "Changes not staged for commit:" block and the list of changed files. I'm a bit confused by this as you change a status test below by inserting these blank lines into the expected output,

[PATCH 1/2] read-tree --reset: add --protect-untracked

2019-05-01 Thread Phillip Wood
From: Phillip Wood Currently there is no way to get git to discard changes to the worktree without overwriting untracked files. `reset --hard`, `checkout --force`, `checkout :/` and `read-tree --reset -u` will all overwrite untracked files. unpack_trees() has known how to avoid overwriting

[PATCH 0/2] read-tree: improve untracked file support

2019-05-01 Thread Phillip Wood
From: Phillip Wood These two patches teach read-tree how to avoid overwriting untracked files when doing '--reset -u' and also how to respect all of git's standard excludes files. I'd like to see the porcelain commands stop overwriting untracked files, this is a first step

[PATCH 2/2] read-tree: add --exclude-standard

2019-05-01 Thread Phillip Wood
From: Phillip Wood Currently there is no way to get read-tree to respect .git/info/exclude or core.excludesFile so scripts using `read-tree -u` have subtly different behavior to porcelain commands like checkout even when they use --exclude-per-directory. This new option is copied from ls-tree&#

Re: [PATCH 0/2] read-tree: improve untracked file support

2019-05-01 Thread Phillip Wood
On 01/05/2019 11:31, Duy Nguyen wrote: On Wed, May 1, 2019 at 5:14 PM Phillip Wood wrote: From: Phillip Wood These two patches teach read-tree how to avoid overwriting untracked files when doing '--reset -u' and also how to respect all of git's standard excludes files.

  1   2   3   4   5   6   7   8   9   10   >