git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Phillip Wood <phillip.wood123@gmail.com>
To: git@vger.kernel.org
Cc: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	"Elijah Newren" <newren@gmail.com>,
	"Johannes Schindelin" <Johannes.Schindelin@gmx.de>
Subject: [PATCH v3 0/5] rebase: cleanup merge strategy option handling
Date: Fri,  7 Apr 2023 14:55:30 +0100	[thread overview]
Message-ID: <cover.1680875701.git.phillip.wood@dunelm.org.uk> (raw)
In-Reply-To: <cover.1678893298.git.phillip.wood@dunelm.org.uk>

From: Phillip Wood <phillip.wood@dunelm.org.uk>

Cleanup the handling of --strategy-option now that we no longer need to
support "--preserve-merges" and properly quote the argument when saving
it to disc.

Thanks to Elijah for his comments.

Changes since V2:

 - Added Elijah's Reviewed-by: trailer.
 - Fixed a typo in patch 4 spotted by Elijah.

Changes since V1:

I've rebased these patches onto 'master' to avoid conflicts with
'sg/parse-options-h-initializers' in the new patch 2 (this series
depends on 'ab/fix-strategy-opts-parsing' but that has now been merged
to master).

Patch 1 - Unchanged.

Patch 2 - New patch to store the merge strategy options in an "struct
          strvec". This patch also introduces a new macro OPT_STRVEC()
          to collect options into an "struct strvec".

Patch 3 - Small simplification due to the changes in patch 2.

Patch 4 - Moved the code to quote a list so it can split by
          split_cmdline() into a new function quote_cmdline() as
	  suggested by Elijah.

Patch 5 - Reworded the commit message as suggested by Elijah.


Base-Commit: 140b9478dad5d19543c1cb4fd293ccec228f1240
Published-As: https://github.com/phillipwood/git/releases/tag/sequencer-merge-strategy-options%2Fv3
View-Changes-At: https://github.com/phillipwood/git/compare/140b9478d...2d1d32811
Fetch-It-Via: git fetch https://github.com/phillipwood/git sequencer-merge-strategy-options/v3

Phillip Wood (5):
  rebase: stop reading and writing unnecessary strategy state
  sequencer: use struct strvec to store merge strategy options
  rebase -m: cleanup --strategy-option handling
  rebase -m: fix serialization of strategy options
  rebase: remove a couple of redundant strategy tests

 alias.c                        | 18 +++++++
 alias.h                        |  3 ++
 builtin/rebase.c               | 54 ++++-----------------
 builtin/revert.c               | 20 ++------
 parse-options-cb.c             | 16 +++++++
 parse-options.h                | 10 ++++
 sequencer.c                    | 57 ++++++++++------------
 sequencer.h                    | 12 +++--
 t/t3402-rebase-merge.sh        | 21 --------
 t/t3418-rebase-continue.sh     | 88 +++++++++++++---------------------
 t/t3436-rebase-more-options.sh | 18 -------
 11 files changed, 126 insertions(+), 191 deletions(-)

Range-diff against v2:
1:  2353c753f5 ! 1:  882b403423 rebase: stop reading and writing unnecessary strategy state
    @@ Commit message
         writing of state files between builtin/rebase.c and sequencer.c but that
         is left for a follow up series.
     
    +    Reviewed-by: Elijah Newren <newren@gmail.com>
         Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
     
      ## builtin/rebase.c ##
2:  dd7b82cdd5 ! 2:  1d8e59aa16 sequencer: use struct strvec to store merge strategy options
    @@ Commit message
         revert" as passing “--no-strategy-option” will now clear any previous
         strategy options whereas before this change it did nothing.
     
    +    Reviewed-by: Elijah Newren <newren@gmail.com>
         Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
     
      ## builtin/revert.c ##
3:  ccef0e6f4b ! 3:  e98ef5ce8c rebase -m: cleanup --strategy-option handling
    @@ Commit message
         mixed blessing but the next commit will fix the root cause of the
         parsing problem so lets not worry about that here.
     
    +    Reviewed-by: Elijah Newren <newren@gmail.com>
         Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
     
      ## builtin/rebase.c ##
4:  9a90212ef2 ! 4:  a5e940e2d0 rebase -m: fix serialization of strategy options
    @@ Commit message
         they are stored as that was an artifact of the scripted rebase.
     
         These changes are backwards compatible so the files written by an older
    -    version of git can be still be read. They are also forwards compatible,
    +    version of git can still be read. They are also forwards compatible,
         the file can still be parsed by recent versions of git as they treat the
         "--" prefix as optional.
     
    +    Reviewed-by: Elijah Newren <newren@gmail.com>
         Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
     
      ## alias.c ##
5:  3515c31b40 ! 5:  2d1d328110 rebase: remove a couple of redundant strategy tests
    @@ Commit message
         preceding test.
     
         Helped-by: Elijah Newren <newren@gmail.com>
    +    Reviewed-by: Elijah Newren <newren@gmail.com>
         Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
     
      ## t/t3402-rebase-merge.sh ##
-- 
2.40.0.670.g64ef305212.dirty


  parent reply	other threads:[~2023-04-07 13:57 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-15 15:14 [PATCH 0/4] rebase: cleanup merge strategy option handling Phillip Wood
2023-03-15 15:14 ` [PATCH 1/4] rebase: stop reading and writing unnecessary strategy state Phillip Wood
2023-03-15 15:14 ` [PATCH 2/4] rebase -m: cleanup --strategy-option handling Phillip Wood
2023-03-15 15:14 ` [PATCH 3/4] rebase -m: fix serialization of strategy options Phillip Wood
2023-04-01 19:27   ` Elijah Newren
2023-04-04 13:02     ` Phillip Wood
2023-03-15 15:14 ` [PATCH 4/4] rebase: remove a couple of redundant strategy tests Phillip Wood
2023-04-01 19:31   ` Elijah Newren
2023-04-04 13:04     ` Phillip Wood
2023-03-15 16:03 ` [PATCH 0/4] rebase: cleanup merge strategy option handling Junio C Hamano
2023-03-15 16:50 ` Felipe Contreras
2023-04-01 19:32 ` Elijah Newren
2023-04-05 15:21 ` [PATCH v2 0/5] " Phillip Wood
2023-04-05 15:21   ` [PATCH v2 1/5] rebase: stop reading and writing unnecessary strategy state Phillip Wood
2023-04-05 15:21   ` [PATCH v2 2/5] sequencer: use struct strvec to store merge strategy options Phillip Wood
2023-04-07  5:44     ` Elijah Newren
2023-04-05 15:21   ` [PATCH v2 3/5] rebase -m: cleanup --strategy-option handling Phillip Wood
2023-04-05 15:21   ` [PATCH v2 4/5] rebase -m: fix serialization of strategy options Phillip Wood
2023-04-07  5:47     ` Elijah Newren
2023-04-05 15:21   ` [PATCH v2 5/5] rebase: remove a couple of redundant strategy tests Phillip Wood
2023-04-07  5:49   ` [PATCH v2 0/5] rebase: cleanup merge strategy option handling Elijah Newren
2023-04-07 13:57     ` Phillip Wood
2023-04-07 17:53       ` Junio C Hamano
2023-04-07 13:55 ` Phillip Wood [this message]
2023-04-07 13:55   ` [PATCH v3 1/5] rebase: stop reading and writing unnecessary strategy state Phillip Wood
2023-04-07 13:55   ` [PATCH v3 2/5] sequencer: use struct strvec to store merge strategy options Phillip Wood
2023-04-07 13:55   ` [PATCH v3 3/5] rebase -m: cleanup --strategy-option handling Phillip Wood
2023-04-07 13:55   ` [PATCH v3 4/5] rebase -m: fix serialization of strategy options Phillip Wood
2023-04-07 13:55   ` [PATCH v3 5/5] rebase: remove a couple of redundant strategy tests Phillip Wood
2023-04-10  9:08 ` [PATCH v4 0/5] rebase: cleanup merge strategy option handling Phillip Wood
2023-04-10  9:08   ` [PATCH v4 1/5] rebase: stop reading and writing unnecessary strategy state Phillip Wood
2023-04-10  9:08   ` [PATCH v4 2/5] sequencer: use struct strvec to store merge strategy options Phillip Wood
2023-04-10  9:08   ` [PATCH v4 3/5] rebase -m: cleanup --strategy-option handling Phillip Wood
2023-04-10  9:08   ` [PATCH v4 4/5] rebase -m: fix serialization of strategy options Phillip Wood
2023-04-10  9:08   ` [PATCH v4 5/5] rebase: remove a couple of redundant strategy tests Phillip Wood
2023-04-10 16:46   ` [PATCH v4 0/5] rebase: cleanup merge strategy option handling Elijah Newren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1680875701.git.phillip.wood@dunelm.org.uk \
    --to=phillip.wood123@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=newren@gmail.com \
    --cc=phillip.wood@dunelm.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).