From: Phillip Wood <phillip.wood123@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: "SZEDER Gábor" <szeder.dev@gmail.com>,
git@vger.kernel.org, "Brian Norris" <briannorris@chromium.org>,
"Phillip Wood" <phillip.wood@dunelm.org.uk>
Subject: Re: [PATCH] sequencer: don't re-read todo for revert and cherry-pick
Date: Mon, 25 Nov 2019 10:47:27 +0000 [thread overview]
Message-ID: <8881749f-195e-7f24-6f38-3b0a53ef8e1e@gmail.com> (raw)
In-Reply-To: <xmqqo8x0zros.fsf@gitster-ct.c.googlers.com>
Hi Junio
On 25/11/2019 01:10, Junio C Hamano wrote:
> Phillip Wood <phillip.wood123@gmail.com> writes:
>
>>>> - } else if (check_todo && !res) {
>>>> + } else if (is_rebase_i(opts) && check_todo && !res) {
>>>
>>> It is a bit sad that setting of check_todo is not something a single
>>> helper function can decide, so that this is_rebase_i(opts) can be
>>> taken into account when that helper function (the logical place
>>> would be do_pick_commit()) decides to set (or not set) check_todo.
>>>
>>> Unfortunately, that is not sufficient, I suspect. Why did a47ba3c7
>>> ("rebase -i: check for updated todo after squash and reword",
>>> 2019-08-19) decide to flip check_todo on when running TODO_EXEC?
>>
>> I'm not sure what you mean by this
>>
>> This is what I had before I saw Gábor's patch (the tests are pretty
>> similar but I think we should check that the messages of all the picks
>> are actually edited with --edit - that does not seem to be checked by
>> the current tests)...
>
> I first thought that unsetting *check_todo in do_pick_commit(), when
> !is_rebase_i(), was a clean solution. But sadly it is *not* a godo
> equivalent to Gábor's patch, because check_todo can be set to true
> without looking at is_rebase_i() in pick_commits() [*1*].
That only happens if we're running a rebase as exec commands are not
used by cherry-pick and revert so the unconditional setting that remains
after my suggested fix should be safe. Prior to a47ba3c7 ("rebase -i:
check for updated todo after squash and reword", 2019-08-19) we always
checked for an updated todo list after processing an exec command
without checking is_rebase_i()
Best Wishes
Phillip
> To ignore
> that setting where the variable's value is used, the hunk we see
> above in the beginning of this message is necessary.
>
> That was what I meant. I think the "This is what I had before"
> patch matches my "I first thought" version, so we were on the same
> page and both wrong ;-)
>
> Thanks.
>
>
> [Footnote]
>
> *1* I still do not know why a47ba3c7 ("rebase -i: check for updated
> todo after squash and reword", 2019-08-19) sets check_todo to true
> without looking at is_rebase_i(). If this unconditonal setting in
> TODO_EXEC did not exist, I think your "This is what I had before"
> patch would have been equivalent to Gábor's patch.
prev parent reply other threads:[~2019-11-25 10:47 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-22 23:10 git 2.24: git revert <commit1> <commit2> requires extra '--continue'? Brian Norris
2019-11-23 0:34 ` SZEDER Gábor
2019-11-23 9:53 ` Phillip Wood
2019-11-23 17:20 ` [PATCH] sequencer: don't re-read todo for revert and cherry-pick SZEDER Gábor
2019-11-23 21:14 ` Johannes Schindelin
2019-11-24 4:49 ` Junio C Hamano
2019-11-24 10:44 ` Phillip Wood
2019-11-24 21:10 ` [PATCH] t3429: try to protect against a potential racy todo file problem SZEDER Gábor
2019-11-25 1:28 ` Junio C Hamano
2019-11-25 3:10 ` SZEDER Gábor
2019-11-25 13:18 ` SZEDER Gábor
2019-11-25 14:43 ` Phillip Wood
2019-11-25 15:15 ` SZEDER Gábor
2019-11-25 16:40 ` Phillip Wood
2019-11-25 1:10 ` [PATCH] sequencer: don't re-read todo for revert and cherry-pick Junio C Hamano
2019-11-25 10:47 ` Phillip Wood [this message]
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=8881749f-195e-7f24-6f38-3b0a53ef8e1e@gmail.com \
--to=phillip.wood123@gmail.com \
--cc=briannorris@chromium.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=phillip.wood@dunelm.org.uk \
--cc=szeder.dev@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.
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).