git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Tan <jonathantanmy@google.com>
To: alban.gruin@gmail.com
Cc: gitster@pobox.com, git@vger.kernel.org,
	phillip.wood123@gmail.com,
	Jonathan Tan <jonathantanmy@google.com>
Subject: Re: ag/sequencer-todo-updates , was Re: What's cooking in git.git (Nov 2019, #03; Tue, 19)
Date: Tue, 19 Nov 2019 12:41:46 -0800	[thread overview]
Message-ID: <20191119204146.168001-1-jonathantanmy@google.com> (raw)
In-Reply-To: <3e616116-2f6f-acff-91b3-4aefc7e62653@gmail.com>

> > * ag/sequencer-todo-updates (2019-10-28) 6 commits
> >  - SQUASH??? tentative leakfix
> >  - sequencer: directly call pick_commits() from complete_action()
> >  - rebase: fill `squash_onto' in get_replay_opts()
> >  - sequencer: move the code writing total_nr on the disk to a new function
> >  - sequencer: update `done_nr' when skipping commands in a todo list
> >  - sequencer: update `total_nr' when adding an item to a todo list
> > 
> >  Reduce unnecessary reading of state variables back from the disk
> >  during sequener operation.
> > 
> >  Is the leakfix patch at the tip the only thing that needs to
> >  prepare the topic ready for 'next'?
> > 
> 
> Yes, it is.

I took a look at this. Some comments:

- Commit message 1 refers to read_todo_list() which doesn't exist.
  Should it be read_populate_todo()?
- Commit 3's todo_list_write_total_nr() could just take an int instead
  of the full "struct todo_list *".

And overall, I wish that there was more descriptions of the code paths
involved, especially in commits 4 and 5. In commit 4, I can see that
run_rebase_interactive() calls get_replay_opts() then
sequencer_continue() (so sequencer_continue() receives whatever
get_replay_opts() outputs - and this commit adds the initialization of
"squash_onto" therein), which calls pick_commits() (which uses
"squash_onto"). I would have liked the commit message to verify that in
sequencer_continue(), before pick_commits(), "squash_onto" was never
written to, so it is crucial for get_replay_opts() to fill
"squash_onto".

And in commit 5, I noticed some analysis from Phillip Wood [1] but I
would have liked more details. For example,

>      - calls read_populate_opts() -- this is unnecessary as we're starting a
>        new rebase, so opts is fully populated

So complete_action() (the function modified in this commit) is called
only by do_interactive_rebase() (in builtin/rebase.c), which is only
called by run_rebase_interactive() (in builtin/rebase.c) when command is
ACTION_NONE, so indeed, we're starting a new rebase. But where the
options fully populated? I see that in do_interactive_rebase(), it is
initialized with get_replay_opts(), but that seems different from
read_populate_opts().

[1] https://public-inbox.org/git/212cdc0d-8cf3-9172-d405-39b3868e6ca4@gmail.com/

Having said all that, I'm not opposed to this being in "next" (except
that the commit message 1 probably should be updated), since it seems to
me that the analysis has already been done, and is merely unwritten.

  reply	other threads:[~2019-11-19 20:41 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-19  7:05 What's cooking in git.git (Nov 2019, #03; Tue, 19) Junio C Hamano
2019-11-19  9:38 ` Danh Doan
2019-11-20  2:52   ` Junio C Hamano
2019-11-19 17:58 ` SZEDER Gábor
2019-11-20  3:02   ` Junio C Hamano
2019-11-20 13:58     ` Derrick Stolee
2019-11-21  0:36       ` Junio C Hamano
2019-11-21 11:10         ` Derrick Stolee
2019-11-22  5:42           ` Junio C Hamano
2019-11-19 18:01 ` ag/sequencer-todo-updates , was " Alban Gruin
2019-11-19 20:41   ` Jonathan Tan [this message]
2019-11-20  3:03     ` Junio C Hamano
2019-11-21  8:17       ` Alban Gruin
2019-11-23  0:47     ` Alban Gruin
2019-11-20 23:32 ` Denton Liu
2019-11-21  0:39   ` Junio C Hamano
2019-11-23 20:35 ` Philippe Blain

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

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

  git send-email \
    --in-reply-to=20191119204146.168001-1-jonathantanmy@google.com \
    --to=jonathantanmy@google.com \
    --cc=alban.gruin@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=phillip.wood123@gmail.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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).