Re: [PATCH v2] sequencer: do not squash 'reword' commits when wehit conflicts

2018-06-19 Thread Phillip Wood
Hi Johannes On 18/06/18 22:42, Johannes Schindelin wrote: > > Hi Phillip, > > On Mon, 18 Jun 2018, Phillip Wood wrote: > >> On 17/06/18 20:28, Johannes Schindelin wrote: >>> >>> On Sun, 17 Jun 2018, Phillip Wood wrote: >>> >>>> On

[PATCH v3] sequencer: do not squash 'reword' commits when we hit conflicts

2018-06-19 Thread Phillip Wood
From: Phillip Wood Ever since commit 18633e1a22 ("rebase -i: use the rebase--helper builtin", 2017-02-09), when a commit marked as 'reword' in an interactive rebase has conflicts and fails to apply, when the rebase is resumed that commit will be squashed into its parent wit

Re: [PATCH v5 0/9] Document/fix/warn about rebase incompatibilities and inconsistencies

2018-06-29 Thread Phillip Wood
Hi Elijah On 27/06/18 08:23, Elijah Newren wrote: > git-rebase has lots of options that are mutually incompatible. Even among > aspects of its behavior that is common to all rebase types, it has a number > of inconsistencies. This series tries to document, fix, and/or warn users > about many of

Re: [PATCH] sequencer.c: terminate the last line of author-script properly

2018-07-18 Thread Phillip Wood
Hi Akinori On 12/07/18 12:18, Akinori MUSHA wrote: It looks like write_author_script() intends to write out a file in Bourne shell syntax, but it doesn't put a closing single quote on the last line. This patch makes .git/rebase-merge/author-script actually parsable by sh(1) by adding a single

Re: [PATCH] sequencer.c: terminate the last line of author-script properly

2018-07-18 Thread Phillip Wood
Hi Junio On 12/07/18 18:22, Junio C Hamano wrote: "Akinori MUSHA" writes: It looks like write_author_script() intends to write out a file in Bourne shell syntax, but it doesn't put a closing single quote on the last line. s/closing single quote/& and the terminating newline/? This patch

Re: [PATCH] sequencer.c: terminate the last line of author-scriptproperly

2018-07-18 Thread Phillip Wood
On 18/07/18 10:45, Phillip Wood wrote: Hi Junio On 12/07/18 18:22, Junio C Hamano wrote: "Akinori MUSHA" writes: It looks like write_author_script() intends to write out a file in Bourne shell syntax, but it doesn't put a closing single quote on the last line. s/closi

Re: [PATCH] sequencer.c: terminate the last line of author-script properly

2018-07-18 Thread Phillip Wood
Hi Akinori On 12/07/18 12:18, Akinori MUSHA wrote: It looks like write_author_script() intends to write out a file in Bourne shell syntax, but it doesn't put a closing single quote on the last line. This patch makes .git/rebase-merge/author-script actually parsable by sh(1) by adding a single q

Re: [PATCH] sequencer.c: terminate the last line of author-scriptproperly

2018-07-18 Thread Phillip Wood
On 18/07/18 14:50, Phillip Wood wrote: Hi Akinori On 12/07/18 12:18, Akinori MUSHA wrote: It looks like write_author_script() intends to write out a file in Bourne shell syntax, but it doesn't put a closing single quote on the last line. This patch makes .git/rebase-merge/author-s

[RFC PATCH] sequencer: fix quoting in write_author_script

2018-07-18 Thread Phillip Wood
From: Phillip Wood Single quotes should be escaped as \' not \\'. Note that this only affects authors that contain a single quote and then only external scripts that read the author script and users whose git is upgraded from the shell version of rebase -i while rebase was stoppe

Re: [PATCH] sequencer.c: terminate the last line of author-script properly

2018-07-19 Thread Phillip Wood
Hi Junio On 18/07/18 18:17, Junio C Hamano wrote: > Phillip Wood writes: > >>> (I think we had code to do so in "git am" >>> that was rewritten in C first). >> >> The code in builtin/am.c doesn't try to write valid posix shell (if >> one

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

2019-02-07 Thread Phillip Wood
Hi Alban On 29/01/2019 15:01, Alban Gruin wrote: > This refactors skip_unnecessary_picks() to work on a todo_list. As this > function is only called by complete_action() (and thus is not used by > rebase -p), the file-handling logic is completely dropped here. > > Instead of truncating the todo

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

2019-02-07 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 append

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

2019-02-08 Thread Phillip Wood
Hi Alban On 06/02/2019 21:11, Alban Gruin wrote: > Hi Phillip, > > I’ve just reread this message and have a couple of additionnal comments. > > Le 01/02/2019 à 12:03, Phillip Wood a écrit : >> Hi Alban >> >> This looks good apart from some missing error ha

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

2019-02-12 Thread Phillip Wood
Hi Alban I think this is almost there, I've got a couple of small comments below. On 10/02/2019 13:26, 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

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

2019-02-13 Thread Phillip Wood
Hi Alban On 12/02/2019 15:21, Alban Gruin wrote: > Hi Phillip, > > Le 12/02/2019 à 11:52, Phillip Wood a écrit : >> Hi Alban >> >> I think this is almost there, I've got a couple of small comments below. >> >> On 10/02/2019 13:26, Alban Gruin wro

Re: [PATCH v7 11/16] sequencer: refactor skip_unnecessary_picks() to work on a todo_list

2019-02-13 Thread Phillip Wood
Hi Alban On 10/02/2019 13:26, Alban Gruin wrote: > This refactors skip_unnecessary_picks() to work on a todo_list. As this > function is only called by complete_action() (and thus is not used by > rebase -p), the file-handling logic is completely dropped here. > > Instead of truncating the todo

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

2019-02-13 Thread Phillip Wood
Hi Alban I think the error handling is fine now, I've got a couple of small comments below. On 10/02/2019 13:26, 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

Re: [PATCH v7 16/16] rebase--interactive: move several functions to rebase--interactive.c

2019-02-13 Thread Phillip Wood
Hi Alban I think it is a good idea to move these functions out of sequencer.c, previously I suggested moving them to rebase-interactive.c rather than builtin/rebase--interactive.c but I don't think it matters that much. If these can be moved when they're refactored (or in a separate commit immedia

Re: [PATCH] rebase: fix regression in rebase.useBuiltin=false test mode

2019-02-14 Thread Phillip Wood
Hi Ævar On 13/02/2019 21:49, Ævar Arnfjörð Bjarmason wrote: Fix a recently introduced regression in c762aada1a ("rebase -x: sanity check command", 2019-01-29) triggered when running the tests with GIT_TEST_REBASE_USE_BUILTIN=false. See 62c23938fa ("tests: add a special setup where rebase.useBuil

Re: git rebase --continue after solving conflicts doesn't work anymore

2019-02-19 Thread Phillip Wood
Dear Sebastián On 19/02/2019 07:22, Eric Sunshine wrote: [cc:+phillip.w...@talktalk.net] Thanks Eric On Tue, Feb 19, 2019 at 1:45 AM Christian Couder wrote: On Tue, Feb 19, 2019 at 5:20 AM Sebastián Mancilla wrote: But since Git 2.20.x it doesn't work anymore. Now after solving the confl

Re: git rebase --continue after solving conflicts doesn't work anymore

2019-02-19 Thread Phillip Wood
feb. de 2019 a la(s) 06:59, Phillip Wood (phillip.w...@talktalk.net) escribió: Dear Sebastián On 19/02/2019 07:22, Eric Sunshine wrote: [cc:+phillip.w...@talktalk.net] Thanks Eric On Tue, Feb 19, 2019 at 1:45 AM Christian Couder wrote: On Tue, Feb 19, 2019 at 5:20 AM Sebastián Mancilla w

Re: [PATCH v4 5/8] git-rebase, sequencer: extend --quiet option for the interactive machinery

2019-02-20 Thread Phillip Wood
On 22/01/2019 20:39, Junio C Hamano wrote: > Elijah Newren writes: > >> Also, I have a fuzzy memory of discussing a very similar case with >> some rebase-oriented option and its on-disk representation, where the >> concern was more about users upgrading git versions during an >> incomplete rebase

Re: [PATCH 2/2] setup: don't fail if commondir reference is deleted.

2019-02-21 Thread Phillip Wood
Hi Michal/Duy On 21/02/2019 13:50, Michal Suchánek wrote: On Thu, 21 Feb 2019 17:50:38 +0700 Duy Nguyen wrote: On Tue, Feb 19, 2019 at 12:05 AM Michal Suchanek wrote: When adding wotktrees git can die in get_common_dir_noenv while examining existing worktrees because the commondir file doe

Re: [PATCH 2/2] setup: don't fail if commondir reference is deleted.

2019-02-21 Thread Phillip Wood
Hi Eric On 21/02/2019 17:12, Eric Sunshine wrote: On Thu, Feb 21, 2019 at 12:07 PM Phillip Wood wrote: On 21/02/2019 13:50, Michal Suchánek wrote: On Tue, Feb 19, 2019 at 12:05 AM Michal Suchanek wrote: The problem is we don't forbid worktree names ending with ".lock". Whic

Re: [PATCH 2/2] setup: don't fail if commondir reference is deleted.

2019-02-22 Thread Phillip Wood
Hi Duy On 22/02/2019 09:32, Duy Nguyen wrote: On Fri, Feb 22, 2019 at 12:07 AM Phillip Wood wrote: Hi Michal/Duy On 21/02/2019 13:50, Michal Suchánek wrote: On Thu, 21 Feb 2019 17:50:38 +0700 Duy Nguyen wrote: On Tue, Feb 19, 2019 at 12:05 AM Michal Suchanek wrote: When adding

Re: [BUG] All files in folder are moved when cherry-picking commit that moves fewer files

2019-02-27 Thread Phillip Wood
Hi Linus On 27/02/2019 12:47, Linus Nilsson wrote: Hi I have found what I suspect to be a bug, or at least not desirable behavior in my case. In one branch, I have moved all files in a directory to another directory. The first directory is now empty in this branch (I haven't tested whether this

Re: [PATCH 1/4] built-in rebase: no need to check out `onto` twice

2019-02-28 Thread Phillip Wood
Hi Johannes On 28/02/2019 15:27, Johannes Schindelin via GitGitGadget wrote: From: Johannes Schindelin In the case that the rebase boils down to a fast-forward, the built-in rebase reset the working tree twice: once to start the rebase at `onto`, then realizing that the original HEAD was an an

Re: [PATCH 1/4] built-in rebase: no need to check out `onto` twice

2019-03-01 Thread Phillip Wood
Hi Dscho On 01/03/2019 13:19, Johannes Schindelin wrote: Hi Phillip, On Thu, 28 Feb 2019, Phillip Wood wrote: On 28/02/2019 15:27, Johannes Schindelin via GitGitGadget wrote: From: Johannes Schindelin In the case that the rebase boils down to a fast-forward, the built-in rebase reset the

Re: [PATCH 1/4] built-in rebase: no need to check out `onto` twice

2019-03-03 Thread Phillip Wood
Hi Junio On 03/03/2019 01:35, Junio C Hamano wrote: > Phillip Wood writes: > >> Thanks for explaining, it all makes sense to me now > > It would be necessary to make sure that it all makes sense to all > future readers. Are they patches good enough as-is for that, o

[BUG] worktree local refs weirdness

2019-03-06 Thread Phillip Wood
When it is run in a worktree 'git for-each-ref' only seems to show refs under refs/rewritten if that directory also exists under $GIT_COMMON_DIR even though they are local to the worktree. Initially I thought this was due to $GIT_COMMON_DIR pointing to a bare repo, but that is not the case. Ho

Re: [PATCH 2/2] cherry-pick/revert: add scissors line on merge conflict

2019-03-06 Thread Phillip Wood
Hi Denton On 06/03/2019 10:30, Denton Liu wrote: 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. Was that the case with cherry-pick and revert as well as merge, or were they missing the scissors

Re: [BUG] worktree local refs weirdness

2019-03-07 Thread Phillip Wood
On 06/03/2019 15:57, Phillip Wood wrote: When it is run in a worktree 'git for-each-ref' only seems to show refs under refs/rewritten if that directory also exists under $GIT_COMMON_DIR even though they are local to the worktree. Initially I thought this was due to $GIT_COMMON_DIR p

Re: [PATCH 2/3] files-backend.c: reduce duplication in add_per_worktree_entries_to_dir()

2019-03-07 Thread Phillip Wood
Hi Duy On 07/03/2019 12:29, Nguyễn Thái Ngọc Duy wrote: This function is duplicated to handle refs/bisect/ and refs/worktree/ and a third prefix is coming. Time to clean up. This also fixes incorrect "refs/worktrees/" length in this code. The correct length is 14 not 11. The test in the next pa

Re: [PATCH 3/3] Make sure refs/rewritten/ is per-worktree

2019-03-07 Thread Phillip Wood
/worktrees/refs/rewritten, should that be .git/refs/rewritten? (and below) Best Wishes Phillip refs/rewritten/bar will show up. add_per_worktree_entries_to_dir() is only needed when the directory .git/worktrees/refs/rewritten is missing. Reported-by: Phillip Wood Signed-off

Re: [PATCH v3 4/4] sequencer.c: don't die on invalid cleanup_arg

2019-03-07 Thread Phillip Wood
Hi Denton Thanks for doing this, I think it looks ok but it would be better to make these changes earlier in the series so they come before what is now patch 3 Best Wishes Phillip On 07/03/2019 09:58, Denton Liu wrote: When get_cleanup_mode was provided with an invalid cleanup_arg, it used

Re: [PATCH v3 3/4] cherry-pick/revert: add scissors line on merge conflict

2019-03-07 Thread Phillip Wood
Hi Denton On 07/03/2019 09:58, Denton Liu wrote: 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. Note that the removal of the if-else tower in git_sequencer_config may appear to be a no-op refacto

Re: [PATCH 1/1] rebase: deprecate --preserve-merges

2019-03-07 Thread Phillip Wood
Hi Johannes It's great to see this. Do we need the deprecation warning in both builtin/rebase.c and rebase--preserve-merges.sh? Won't that end up warning twice - maybe that's a good thing but if we go for only one I prefer the wording in rebase--preserve-merges.sh Best Wishes Phillip On 07

Re: [PATCH v3 3/4] cherry-pick/revert: add scissors line on merge conflict

2019-03-07 Thread Phillip Wood
On 07/03/2019 17:56, Denton Liu wrote: > Hi Phillip, > > On Thu, Mar 07, 2019 at 03:24:16PM +, Phillip Wood wrote: >> Hi Denton >> >> On 07/03/2019 09:58, Denton Liu wrote: >>> diff --git a/builtin/rebase--helper.c b/builtin/rebase--helper.c >>>

Re: [PATCH v7 5/8] merge: cleanup messages like commit

2019-03-11 Thread Phillip Wood
Hi Denton/Eric On 11/03/2019 05:49, Eric Sunshine wrote: On Sun, Mar 10, 2019 at 11:42 PM Denton Liu wrote: This change allows git-merge messages to be cleaned up with the commit.cleanup configuration or --cleanup option, just like how git-commit does it. We also give git-pull the passthrough

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

2019-03-11 Thread Phillip Wood
Hi Duy On 08/03/2019 09:57, Nguyễn Thái Ngọc Duy wrote: > "git checkout" doing too many things is a source of confusion for many > users (and it even bites old timers sometimes). To remedy that, the > command will be split into two new ones: switch and > something-to-checkout-paths. I think th

Re: [PATCH v7 4/8] sequencer.c: remove duplicate code

2019-03-11 Thread Phillip Wood
Hi Denton One small comment below, this basically looks fine to me On 11/03/2019 03:42, Denton Liu wrote: Since we implemented get_cleanup_mode, we had some duplicate code in git_sequencer_config which essentially performed the same operations. Refactor git_sequencer_config to take advantage of

Re: [PATCH v7 5/8] merge: cleanup messages like commit

2019-03-11 Thread Phillip Wood
Hi Denton On 11/03/2019 03:42, Denton Liu wrote: This change allows git-merge messages to be cleaned up with the commit.cleanup configuration or --cleanup option, just like how git-commit does it. We also give git-pull the passthrough option of --cleanup so that it can also take advantage of th

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

2019-03-11 Thread Phillip Wood
Hi Duy On 11/03/2019 11:47, Duy Nguyen wrote: On Mon, Mar 11, 2019 at 6:16 PM Phillip Wood wrote: Hi Duy On 08/03/2019 09:57, Nguyễn Thái Ngọc Duy wrote: "git checkout" doing too many things is a source of confusion for many users (and it even bites old timers sometimes). To r

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

2019-03-11 Thread Phillip Wood
On 11/03/2019 17:24, Elijah Newren wrote: On Mon, Mar 11, 2019 at 4:47 AM Duy Nguyen wrote: On Mon, Mar 11, 2019 at 6:16 PM Phillip Wood wrote: Hi Duy On 08/03/2019 09:57, Nguyễn Thái Ngọc Duy wrote: "git checkout" doing too many things is a source of confusion for many use

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

2019-03-12 Thread Phillip Wood
Hi Elijah On 11/03/2019 22:04, Elijah Newren wrote: On Mon, Mar 11, 2019 at 1:51 PM Phillip Wood wrote: On 11/03/2019 17:24, Elijah Newren wrote: On Mon, Mar 11, 2019 at 4:47 AM Duy Nguyen wrote: On Mon, Mar 11, 2019 at 6:16 PM Phillip Wood wrote: On 08/03/2019 09:57, Nguyễn Thái Ngọc

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

2019-03-12 Thread Phillip Wood
Hi Elijah On 11/03/2019 17:54, Elijah Newren wrote: A few other comments that I thought of while responding elsewhere in the thread that didn't make sense to include elsewhere... On Fri, Mar 8, 2019 at 2:00 AM Nguyễn Thái Ngọc Duy wrote: +-m:: +--merge:: + If you have local modificatio

Re: [PATCH v7 8/8] cherry-pick/revert: add scissors line on merge conflict

2019-03-12 Thread Phillip Wood
Hi Denton I've got a couple of small comments, but this looks fine to me On 11/03/2019 03:42, Denton Liu wrote: 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. Signed-off-by: Denton Liu --- Do

Re: [PATCH v8 00/18] sequencer: refactor functions working on a todo_list

2019-03-13 Thread Phillip Wood
Hi Alban Thanks for working on this. The range and inter diffs look fine, I think this is ready for next now. Best Wishes Phillip On 05/03/2019 19:17, Alban Gruin wrote: At the center of the "interactive" part of the interactive rebase lies the todo list. When the user starts an interactiv

Re: [PATCH] t4150: remove unused variable

2019-03-13 Thread Phillip Wood
On 12/03/2019 14:38, Andrei Rybak wrote: In commit 735285b403 ("am: fix signoff when other trailers are present", 2017-08-08) tests using variable $signoff were rewritten and it is no longer used, so just remove it from the test setup. Well spotted, thanks Phillip Signed-off-by: Andrei Rybak

[PATCH 1/3] sequencer: break some long lines

2019-03-13 Thread Phillip Wood
From: Phillip Wood reformat save_opts() to remove excessively long lines. Signed-off-by: Phillip Wood --- sequencer.c | 35 ++- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/sequencer.c b/sequencer.c index 0db410d590..5e19b22f8f 100644 --- a

[PATCH 3/3] cherry-pick --continue: remember options

2019-03-13 Thread Phillip Wood
From: Phillip Wood Remember --allow-empty, --allow-empty-message and --keep-redundant-commits when cherry-pick stops for a conflict resolution. Signed-off-by: Phillip Wood --- sequencer.c | 18 ++ t/t3507-cherry-pick-conflict.sh | 4 ++-- 2 files changed

[PATCH 2/3] cherry-pick: demonstrate option amnesia

2019-03-13 Thread Phillip Wood
From: Phillip Wood When cherry-pick stops for a conflict resolution it forgets --allow-empty --allow-empty-message and --keep-redundant-commits. Signed-off-by: Phillip Wood --- t/t3507-cherry-pick-conflict.sh | 24 1 file changed, 24 insertions(+) diff --git a/t

[PATCH 3/4] am: document --rerere-autoupdate

2019-03-13 Thread Phillip Wood
From: Phillip Wood This option was missing from the man page. Signed-off-by: Phillip Wood --- Documentation/git-am.txt | 5 + 1 file changed, 5 insertions(+) diff --git a/Documentation/git-am.txt b/Documentation/git-am.txt index 6f6c34b0f4..fc3b993c33 100644 --- a/Documentation/git

[PATCH 4/4] merge: tweak --rerere-autoupdate documentation

2019-03-13 Thread Phillip Wood
From: Phillip Wood Spell out --no-rerere-autoupdate explictly to make searching easier. This matches the other --no options in the man page. Signed-off-by: Phillip Wood --- Documentation/git-merge.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/git

[PATCH 2/4] cherry-pick/revert: document --rerere-autoupdate

2019-03-13 Thread Phillip Wood
From: Phillip Wood This option was missing from the man pages. --- Documentation/git-cherry-pick.txt | 5 + Documentation/git-revert.txt | 5 + 2 files changed, 10 insertions(+) diff --git a/Documentation/git-cherry-pick.txt b/Documentation/git-cherry-pick.txt index b8cfeec67e

[PATCH 1/4] rebase: document --rerere-autoupdate

2019-03-13 Thread Phillip Wood
From: Phillip Wood This option was missing from the man page. Signed-off-by: Phillip Wood --- Documentation/git-rebase.txt | 5 + 1 file changed, 5 insertions(+) diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt index 5629ba4c5d..fbf9a4d70a 100644 --- a

Re: Possible race condition with git-rebase + .git/index.lock

2019-03-13 Thread Phillip Wood
Hi Sergio On 12/03/2019 19:32, Sergio Durigan Junior wrote: On Tuesday, March 12 2019, Elijah Newren wrote: On Tue, Mar 12, 2019 at 9:48 AM Sergio Durigan Junior wrote: On Tuesday, March 12 2019, Duy Nguyen wrote: On Tue, Mar 12, 2019 at 5:18 AM Sergio Durigan Junior wrote: This works wi

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

2019-03-14 Thread Phillip Wood
On 12/03/2019 17:05, Elijah Newren wrote: > On Tue, Mar 12, 2019 at 4:58 AM Duy Nguyen wrote: >> On Tue, Mar 12, 2019 at 12:25 AM Elijah Newren wrote: >>> On Mon, Mar 11, 2019 at 4:47 AM Duy Nguyen wrote: >>>> On Mon, Mar 11, 2019 at 6:16 PM Phillip Wood >>

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

2019-03-14 Thread Phillip Wood
On 12/03/2019 16:43, Elijah Newren wrote: > On Tue, Mar 12, 2019 at 4:06 AM Phillip Wood > wrote: >> >> Hi Elijah >> >> On 11/03/2019 17:54, Elijah Newren wrote: >>> A few other comments that I thought of while responding elsewhere in >>> the th

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

2019-03-14 Thread Phillip Wood
On 14/03/2019 09:17, Duy Nguyen wrote: > On Tue, Mar 12, 2019 at 01:28:35PM -0400, Eric Sunshine wrote: Again, not much of a datapoint, but I do use --orphan periodically. The idea of "fixing" the behavior so that --orphan starts with a clean slate is certainly appealing (since it ma

am/cherry-pick/rebase/revert: document --rerere-autoupdate

2019-03-14 Thread Phillip Wood
I've squashed the first tree patches together Best Wishes Phillip

[PATCH v2 2/2] merge: tweak --rerere-autoupdate documentation

2019-03-14 Thread Phillip Wood
From: Phillip Wood Spell out --no-rerere-autoupdate explictly to make searching easier. This matches the other --no options in the man page. Signed-off-by: Phillip Wood --- Documentation/git-merge.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/git

[PATCH v2 1/2] am/cherry-pick/rebase/revert: document --rerere-autoupdate

2019-03-14 Thread Phillip Wood
From: Phillip Wood This option was missing from the man pages of these commands. Signed-off-by: Phillip Wood --- Documentation/git-am.txt | 5 + Documentation/git-cherry-pick.txt | 5 + Documentation/git-rebase.txt | 5 + Documentation/git-revert.txt | 5

Re: [PATCH v3] rebase: remove the rebase.useBuiltin setting

2019-03-18 Thread Phillip Wood
Hi Ævar Thanks for doing this, it's great to see it from a maintenance perspective as well as it meaning the builtin rebase is considered stable. A couple small nit picks below On 15/03/2019 13:45, Ævar Arnfjörð Bjarmason wrote: Remove the rebase.useBuiltin setting, which was added as an esc

Re: [PATCH v4] rebase: remove the rebase.useBuiltin setting

2019-03-19 Thread Phillip Wood
Hi Ævar On 18/03/2019 11:01, Ævar Arnfjörð Bjarmason wrote: Remove the rebase.useBuiltin setting, which was added as an escape hatch to disable the builtin version of rebase first released with Git 2.20. See [1] for the initial implementation of rebase.useBuiltin, and [2] and [3] for the documen

Re: [PATCH v8 08/11] merge: cleanup messages like commit

2019-03-19 Thread Phillip Wood
this change. Finally, add testing to ensure 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. Reviewed-by: Phillip Wood I'd echo Eric's comments about R

Re: [PATCH] checkout.txt: note about losing staged changes with --merge

2019-03-19 Thread Phillip Wood
wait for merge wizards to come in and work their magic. There may be a way forward [1]. [1] CABPp-BFoL_U=bzon4semaqsku2tkwnognqjt5muaoejtkgu...@mail.gmail.com Reported-by: Phillip Wood I try to use phillip.w...@dunelm.org.uk for git stuff as it shouldn't change in the future. Signed-off-

Re: [PATCH v2] unpack-trees: fix oneway_merge accidentally carry over stage index

2019-03-19 Thread Phillip Wood
"dst") index entry from the one in index, but we do clear CE_STAGEMASK. I briefly checked two- and three-way merge functions. I think we don't have the same problem in those. Reported-by: Phillip Wood Signed-off-by: Nguyễn Thái Ngọc Duy --- v2 updates log message to describe

[RFC PATCH 05/11] rebase -i: remove duplication

2019-03-19 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 80252d72df..e55bd0348a 100644

[RFC PATCH 02/11] rebase: rename write_basic_state()

2019-03-19 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 52114cbf0d..b634879c5b 100644 --- a/builtin/rebase.c +++ b/builtin

[RFC PATCH 03/11] rebase: use OPT_RERERE_AUTOUPDATE()

2019-03-19 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

[RFC PATCH 04/11] rebase -i: combine rebase--interactive.c with rebase.c

2019-03-19 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

[RFC PATCH 07/11] rebase -i: use struct object_id for squash_onto

2019-03-19 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

[RFC PATCH 09/11] rebase -i: use struct rebase_options in do_interactive_rebase()

2019-03-19 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

[RFC PATCH 06/11] rebase -i: use struct commit when parsing options

2019-03-19 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

[RFC PATCH 10/11] rebase: use a common action enum

2019-03-19 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 --- Notes: I'm not

[RFC PATCH 00/11] rebase -i run without forking rebase--interactive

2019-03-19 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`. This series refactors rebase--interactive so that interactive rebases can be started by the builtin rebase without forking. My motivation was to

[RFC PATCH 01/11] sequencer: always discard index after checkout

2019-03-19 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

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

2019-03-19 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

[RFC PATCH 11/11] rebase -i: run without forking rebase--interactive

2019-03-19 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

Re: [PATCH v4 22/26] switch: reject if some operation is in progress

2019-03-20 Thread Phillip Wood
Hi Duy The new switch command is shaping up nicely On 17/03/2019 12:49, 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 th

Re: [RFC PATCH 01/11] sequencer: always discard index after checkout

2019-03-21 Thread Phillip Wood
On 20/03/2019 01:50, Duy Nguyen wrote: On Wed, Mar 20, 2019 at 2:04 AM Phillip Wood wrote: It would perhaps be better to pass around the_index rather than the_repository Not by a large margin. For sequencer.c most operations require more than just the index and passing 's

Re: [RFC PATCH 00/11] rebase -i run without forking rebase--interactive

2019-03-21 Thread Phillip Wood
On 20/03/2019 23:05, Ævar Arnfjörð Bjarmason wrote: On Tue, Mar 19 2019, Phillip Wood wrote: From: Phillip Wood When the builtin rebase starts an interactive rebase it parses the options and then repackages them and forks `rebase--interactive`. This series refactors rebase--interactive

Re: [RFC PATCH 10/11] rebase: use a common action enum

2019-03-21 Thread Phillip Wood
On 19/03/2019 20:24, Ævar Arnfjörð Bjarmason wrote: On Tue, Mar 19 2019, Phillip Wood wrote: 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

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

2019-03-21 Thread Phillip Wood
Hi Junio On 21/03/2019 04:21, Junio C Hamano wrote: Phillip Wood writes: +static struct replay_opts get_replay_opts(const struct rebase_options *opts) +{ + struct replay_opts replay = REPLAY_OPTS_INIT; + + sequencer_init_config(&replay); + + replay.ac

Re: [PATCH v9 07/11] sequencer.c: remove duplicate code

2019-03-26 Thread Phillip Wood
are conflicts what happens when if I run 'commit --no-edit' to commit the conflict resolution - does it know which cleanup mode to use? Best Wishes Phillip Also, we lowercase some user-facing strings. Helped-by: Phillip Wood Signed-off-by: Denton Liu --- builtin/commit.c |

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

2019-03-27 Thread Phillip Wood
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 mean aborting >> something when you just want to get out to examine some other commit. >> An

[PATCH v4 3/4] add -p: allow line selection to be inverted

2018-07-26 Thread Phillip Wood
From: Phillip Wood If the list of lines to be selected begins with '-' select all the lines except the ones listed. Signed-off-by: Phillip Wood --- Documentation/git-add.txt | 3 ++- git-add--interactive.perl | 19 +++ t/t3701-add-interactive.sh | 2 +- 3 files c

[RFC PATCH v4 2/4] add -p: select modified lines correctly

2018-07-26 Thread Phillip Wood
From: Phillip Wood When a set of lines is modified the hunk contains deletions followed by insertions. To correctly stage a subset of the modified lines we need to match up the selected deletions with the selected insertions otherwise we end up with deletions and context lines followed by

[RFC PATCH v4 0/4] add -p: select individual hunk lines

2018-07-26 Thread Phillip Wood
From: Phillip Wood I've updated this series based on Ævar's feedback on v3 (to paraphrase stop using '$_' so much and fix staging modified lines.). The first patch is functionally equivalent to the previous version but with a reworked implementation. Patch 2 is new, it

[PATCH v4 4/4] add -p: optimize line selection for short hunks

2018-07-26 Thread Phillip Wood
From: Phillip Wood If there are fewer than ten changes in a hunk then make spaces optional when selecting individual lines. This means that for short hunks one can just type 1-357 to stage lines 1, 2, 3, 5 & 7. Signed-off-by: Phillip Wood --- Documentation/git-add.txt | 9 + git

[PATCH v4 1/4] add -p: select individual hunk lines

2018-07-26 Thread Phillip Wood
From: Phillip Wood When I end up editing hunks it is almost always because I want to stage a subset of the lines in the hunk. Doing this by editing the hunk is inconvenient and error prone (especially so if the patch is going to be reversed before being applied). Instead offer an option for add

[RFC PATCH v5 0/4] add -p: select individual hunk lines

2018-07-26 Thread Phillip Wood
From: Phillip Wood Unfortuantely v4 had test failures due to a suprious brace from a last minute edit to a comment that I forgot to test. This version fixes that, my applogies for the patch churn. I've updated this series based on Ævar's feedback on v3 (to paraphrase stop using '

[RFC PATCH v5 2/4] add -p: select modified lines correctly

2018-07-26 Thread Phillip Wood
From: Phillip Wood When a set of lines is modified the hunk contains deletions followed by insertions. To correctly stage a subset of the modified lines we need to match up the selected deletions with the selected insertions otherwise we end up with deletions and context lines followed by

[PATCH v5 3/4] add -p: allow line selection to be inverted

2018-07-26 Thread Phillip Wood
From: Phillip Wood If the list of lines to be selected begins with '-' select all the lines except the ones listed. Signed-off-by: Phillip Wood --- Documentation/git-add.txt | 3 ++- git-add--interactive.perl | 19 +++ t/t3701-add-interactive.sh | 2 +- 3 files c

[PATCH v5 1/4] add -p: select individual hunk lines

2018-07-26 Thread Phillip Wood
From: Phillip Wood When I end up editing hunks it is almost always because I want to stage a subset of the lines in the hunk. Doing this by editing the hunk is inconvenient and error prone (especially so if the patch is going to be reversed before being applied). Instead offer an option for add

[PATCH v5 4/4] add -p: optimize line selection for short hunks

2018-07-26 Thread Phillip Wood
From: Phillip Wood If there are fewer than ten changes in a hunk then make spaces optional when selecting individual lines. This means that for short hunks one can just type 1-357 to stage lines 1, 2, 3, 5 & 7. Signed-off-by: Phillip Wood --- Documentation/git-add.txt | 9 + git

Re: [PATCH v5 1/4] add -p: select individual hunk lines

2018-07-27 Thread Phillip Wood
On 26/07/18 20:36, Junio C Hamano wrote: > Phillip Wood writes: > >> +sub label_hunk_lines { >> +my $hunk = shift; >> +my $text = $hunk->{TEXT}; >> +my (@line_flags, @lines); >> +my ($block, $label, $last_mode) = (0, 0, ''); >

Re: [RFC PATCH v5 2/4] add -p: select modified lines correctly

2018-07-27 Thread Phillip Wood
Hi Junio, thanks for the comments On 26/07/18 20:30, Junio C Hamano wrote: > Phillip Wood writes: > > An interesting problem you are solving ;-) > >> For example given the hunk >> 1 -* a longer description of the >> 2 - first item >>

Re: [RFC PATCH] sequencer: fix quoting in write_author_script

2018-07-27 Thread Phillip Wood
Hi Johannes On 26/07/18 13:33, Johannes Schindelin wrote: > Hi Phillip, > > On Wed, 18 Jul 2018, Phillip Wood wrote: > >> From: Phillip Wood >> >> Single quotes should be escaped as \' not \\'. Note that this only >> affects authors that contain a

<    1   2   3   4   5   6   7   8   9   10   >