git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / Atom feed
From: Phillip Wood <phillip.wood123@gmail.com>
To: Git Mailing List <git@vger.kernel.org>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	Junio C Hamano <gitster@pobox.com>,
	Elijah Newren <newren@gmail.com>, Duy Nguyen <pclouds@gmail.com>,
	Alban Gruin <alban.gruin@gmail.com>,
	Josh Steadmon <steadmon@google.com>,
	Ævar Arnfjörð Bjarmason  <avarab@gmail.com>,
	Phillip Wood <phillip.wood@dunelm.org.uk>
Subject: [PATCH v1 00/12] Run rebase -i without forking rebase--interactive
Date: Wed, 17 Apr 2019 15:30:32 +0100
Message-ID: <20190417143044.17655-1-phillip.wood123@gmail.com> (raw)
In-Reply-To: <20190319190317.6632-1-phillip.wood123@gmail.com>

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

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 conflicts with the
updated dl/merge-cleanup-scissors-fix I posted earlier. (There are
conflicts with other series but they are already resolved in pu)

This series still based on a merge of master [e902e9bcae ("The second
batch", 2019-03-11)] and ag/sequencer-reduce-rewriting-todo ed35d18841
("rebase--interactive: move transform_todo_file()", 2019-03-05). It
can be fetched from the tag rebase-i-no-fork/v1 at
https://github.com/phillipwood/git.git

Phillip Wood (12):
  sequencer: always discard index after checkout
  rebase: don't translate trace strings
  rebase: rename write_basic_state()
  rebase: use OPT_RERERE_AUTOUPDATE()
  rebase -i: combine rebase--interactive.c with rebase.c
  rebase -i: remove duplication
  rebase -i: use struct commit when parsing options
  rebase -i: use struct object_id for squash_onto
  rebase -i: use struct rebase_options to parse args
  rebase -i: use struct rebase_options in do_interactive_rebase()
  rebase: use a common action enum
  rebase -i: run without forking rebase--interactive

 Makefile                      |   1 -
 builtin/rebase--interactive.c | 377 --------------------
 builtin/rebase.c              | 624 ++++++++++++++++++++++++++--------
 parse-options-cb.c            |  34 ++
 parse-options.h               |   4 +
 sequencer.c                   |  42 ++-
 sequencer.h                   |   7 +-
 7 files changed, 555 insertions(+), 534 deletions(-)
 delete mode 100644 builtin/rebase--interactive.c

Range-diff to rfc
 1:  549d45dc63 =  1:  fe51202dfb sequencer: always discard index after checkout
 -:  ---------- >  2:  2598165c0f rebase: don't translate trace strings
 2:  d896a3c76f =  3:  48801ccdd5 rebase: rename write_basic_state()
 3:  253de33871 =  4:  66972f0f7d rebase: use OPT_RERERE_AUTOUPDATE()
 4:  0aaeaf7c09 =  5:  c18aa58305 rebase -i: combine rebase--interactive.c with rebase.c
 5:  ff539c37d1 =  6:  27982630d1 rebase -i: remove duplication
 6:  71559a38db =  7:  f28e8df52a rebase -i: use struct commit when parsing options
 7:  34c9e4ae96 =  8:  1ae13b5a7d rebase -i: use struct object_id for squash_onto
 8:  4fe81c9e81 !  9:  efcc32d8e3 rebase -i: use struct rebase_options to parse args
    @@ -65,9 +65,9 @@
     +{
     +	struct replay_opts replay = REPLAY_OPTS_INIT;
     +
    -+	sequencer_init_config(&replay);
    -+
     +	replay.action = REPLAY_INTERACTIVE_REBASE;
    ++	sequencer_init_config(&replay);
    ++
     +	replay.signoff = opts->signoff;
     +	replay.allow_ff = !(opts->flags & REBASE_FORCE);
     +	if (opts->allow_rerere_autoupdate)
 9:  09343e540f = 10:  c89d815ad4 rebase -i: use struct rebase_options in do_interactive_rebase()
10:  9ad1482d7f ! 11:  fda591f006 rebase: use a common action enum
    @@ -38,14 +30,13 @@
     +	ACTION_ADD_EXEC
     +};
     +
    -+static const char *action_names[] = { N_("undefined"),
    -+				      N_("continue"),
    -+				      N_("skip"),
    -+				      N_("abort"),
    -+				      N_("quit"),
    -+				      N_("edit_todo"),
    -+				      N_("show_current_patch"),
    -+				      NULL };
    ++static const char *action_names[] = { "undefined",
    ++				      "continue",
    ++				      "skip",
    ++				      "abort",
    ++				      "quit",
    ++				      "edit_todo",
    ++				      "show_current_patch" };
     +
      static int add_exec_commands(struct string_list *commands)
      {
    @@ -173,14 +164,13 @@
     -		ACTION_EDIT_TODO,
     -		ACTION_SHOW_CURRENT_PATCH,
     -	} action = NO_ACTION;
    --	static const char *action_names[] = { N_("undefined"),
    --					      N_("continue"),
    --					      N_("skip"),
    --					      N_("abort"),
    --					      N_("quit"),
    --					      N_("edit_todo"),
    --					      N_("show_current_patch"),
    --					      NULL };
    +-	static const char *action_names[] = { "undefined",
    +-					      "continue",
    +-					      "skip",
    +-					      "abort",
    +-					      "quit",
    +-					      "edit_todo",
    +-					      "show_current_patch" };
     +	enum action action = ACTION_NONE;
      	const char *gpg_sign = NULL;
      	struct string_list exec = STRING_LIST_INIT_NODUP;
11:  ebfd7f80d9 ! 12:  d921226d32 rebase -i: run without forking rebase--interactive
    @@ -7,10 +7,18 @@
         `rebase--interactive`. Separate the option parsing in
         cmd_rebase__interactive() from the business logic to allow interactive
         rebases can be run without forking `rebase__interactive` by calling
    -    run_rebase_interactive() directly. This makes it easy to debug the
    -    sequencer without worrying about attaching to child processes. It also
    -    makes it easy to remove cmd_rebase__interactive() in the future when
    -    git-legacy-rebase.sh and git-rebase--preserve-merges.sh are retired.
    +    run_rebase_interactive() directly.
    +
    +    Starting interactive rebases without forking makes it easy to debug
    +    the sequencer without worrying about attaching to child
    +    processes. Ævar has also reported that some of the rebase perf tests
    +    are 30% faster [1].
    +
    +    This patch also makes it easy to remove cmd_rebase__interactive() in
    +    the future when git-legacy-rebase.sh and
    +    git-rebase--preserve-merges.sh are retired.
    +
    +    [1] https://public-inbox.org/git/87y359cfjj.fsf@evledraar.gmail.com/

         Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>

--
2.21.0


  parent reply index

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-19 19:03 [RFC PATCH 00/11] rebase -i run " Phillip Wood
2019-03-19 19:03 ` [RFC PATCH 01/11] sequencer: always discard index after checkout Phillip Wood
2019-03-20  1:50   ` Duy Nguyen
2019-03-21 14:35     ` Phillip Wood
2019-03-19 19:03 ` [RFC PATCH 02/11] rebase: rename write_basic_state() Phillip Wood
2019-03-19 19:03 ` [RFC PATCH 03/11] rebase: use OPT_RERERE_AUTOUPDATE() Phillip Wood
2019-03-19 19:03 ` [RFC PATCH 04/11] rebase -i: combine rebase--interactive.c with rebase.c Phillip Wood
2019-03-19 19:03 ` [RFC PATCH 05/11] rebase -i: remove duplication Phillip Wood
2019-03-19 19:03 ` [RFC PATCH 06/11] rebase -i: use struct commit when parsing options Phillip Wood
2019-03-19 19:03 ` [RFC PATCH 07/11] rebase -i: use struct object_id for squash_onto Phillip Wood
2019-03-19 19:03 ` [RFC PATCH 08/11] rebase -i: use struct rebase_options to parse args Phillip Wood
2019-03-21  4:21   ` Junio C Hamano
2019-03-21 14:59     ` Phillip Wood
2019-03-22  3:34       ` Junio C Hamano
2019-03-21 21:13   ` Alban Gruin
2019-04-10 19:16     ` Phillip Wood
2019-03-19 19:03 ` [RFC PATCH 09/11] rebase -i: use struct rebase_options in do_interactive_rebase() Phillip Wood
2019-03-19 19:03 ` [RFC PATCH 10/11] rebase: use a common action enum Phillip Wood
2019-03-19 20:24   ` Ævar Arnfjörð Bjarmason
2019-03-21 14:43     ` Phillip Wood
2019-03-19 19:03 ` [RFC PATCH 11/11] rebase -i: run without forking rebase--interactive Phillip Wood
2019-03-20 20:50 ` [RFC PATCH 00/11] rebase -i " Josh Steadmon
2019-03-20 23:05 ` Ævar Arnfjörð Bjarmason
2019-03-21 14:40   ` Phillip Wood
2019-03-21  1:44 ` Junio C Hamano
2019-04-17 14:30 ` Phillip Wood [this message]
2019-04-17 14:30   ` [PATCH v1 01/12] sequencer: always discard index after checkout Phillip Wood
2019-04-17 14:30   ` [PATCH v1 02/12] rebase: don't translate trace strings Phillip Wood
2019-04-19  5:53     ` Junio C Hamano
2019-04-25 17:47       ` Phillip Wood
2019-04-17 14:30   ` [PATCH v1 03/12] rebase: rename write_basic_state() Phillip Wood
2019-04-17 14:30   ` [PATCH v1 04/12] rebase: use OPT_RERERE_AUTOUPDATE() Phillip Wood
2019-04-17 14:30   ` [PATCH v1 05/12] rebase -i: combine rebase--interactive.c with rebase.c Phillip Wood
2019-04-17 14:30   ` [PATCH v1 06/12] rebase -i: remove duplication Phillip Wood
2019-04-17 14:30   ` [PATCH v1 07/12] rebase -i: use struct commit when parsing options Phillip Wood
2019-04-17 14:30   ` [PATCH v1 08/12] rebase -i: use struct object_id for squash_onto Phillip Wood
2019-04-17 14:30   ` [PATCH v1 09/12] rebase -i: use struct rebase_options to parse args Phillip Wood
2019-04-17 14:30   ` [PATCH v1 10/12] rebase -i: use struct rebase_options in do_interactive_rebase() Phillip Wood
2019-04-17 14:30   ` [PATCH v1 11/12] rebase: use a common action enum Phillip Wood
2019-04-17 14:30   ` [PATCH v1 12/12] rebase -i: run without forking rebase--interactive Phillip Wood

Reply instructions:

You may reply publically 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=20190417143044.17655-1-phillip.wood123@gmail.com \
    --to=phillip.wood123@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=alban.gruin@gmail.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=newren@gmail.com \
    --cc=pclouds@gmail.com \
    --cc=phillip.wood@dunelm.org.uk \
    --cc=steadmon@google.com \
    /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

git@vger.kernel.org list mirror (unofficial, one of many)

Archives are clonable:
	git clone --mirror https://public-inbox.org/git
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.version-control.git
	nntp://ou63pmih66umazou.onion/inbox.comp.version-control.git
	nntp://czquwvybam4bgbro.onion/inbox.comp.version-control.git
	nntp://hjrcffqmbrq6wope.onion/inbox.comp.version-control.git
	nntp://news.gmane.org/gmane.comp.version-control.git

 note: .onion URLs require Tor: https://www.torproject.org/

AGPL code for this site: git clone https://public-inbox.org/ public-inbox