From: Junio C Hamano <gitster@pobox.com>
To: Johannes Schindelin <johannes.schindelin@gmx.de>
Cc: Phil Hord <hordp@cisco.com>,
git@vger.kernel.org, phil.hord@gmail.com,
Fabian Ruch <bafain@gmail.com>
Subject: Re: [PATCH] rebase -i: redo tasks that die during cherry-pick
Date: Wed, 29 Apr 2015 10:15:55 -0700 [thread overview]
Message-ID: <xmqq7fsu6ek4.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <42512fad738e0ec47a8cdb6e6e92e994@www.dscho.org> (Johannes Schindelin's message of "Wed, 29 Apr 2015 01:17:39 +0200")
Johannes Schindelin <johannes.schindelin@gmx.de> writes:
> Hi,
>
> On 2015-04-29 00:55, Phil Hord wrote:
>> When rebase--interactive processes a task, it removes the item from
>> the todo list and appends it to another list of executed tasks. If a
>> pick (this includes squash and fixup) fails before the index has
>> recorded the changes, take the corresponding item and put it on the todo
>> list again. Otherwise, the changes introduced by the scheduled commit
>> would be lost.
>>
>> That kind of decision is possible since the cherry-pick command
>> signals why it failed to apply the changes of the given commit. Either
>> the changes are recorded in the index using a conflict (return value 1)
>> and rebase does not continue until they are resolved or the changes
>> are not recorded in the index (return value neither 0 nor 1) and
>> rebase has to try again with the same task.
>>
>> Add a test cases for regression testing to the "rebase-interactive"
>> test suite.
>>
>> Signed-off-by: Fabian Ruch <bafain@gmail.com>
>> Signed-off-by: Phil Hord <hordp@cisco.com>
>> ---
>
> ACK.
>
> It would be even nicer to avoid removing the task from the `todo` list
> until it has been performed correctly, of course, but I believe that
> would require a much more invasive patch. So this here patch is fine
> with me.
Thanks, will queue.
Aside from the "much more invasive" possibility, the patch makes me
wonder if it would have been a better design to have a static "todo"
with a "current" pointer as two state files. Then reschedule would
have been just the matter of decrementing the number in "current",
instead of "grab the last line of one file and prepend to the other
file, and then lose the last line".
next prev parent reply other threads:[~2015-04-29 17:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-28 22:55 [PATCH] rebase -i: redo tasks that die during cherry-pick Phil Hord
2015-04-28 23:17 ` Johannes Schindelin
2015-04-29 17:15 ` Junio C Hamano [this message]
2015-04-29 19:32 ` Phil Hord
2015-04-29 19:41 ` Junio C Hamano
2015-04-30 7:49 ` rebase -i's todo/done list, was " Johannes Schindelin
2015-04-30 9:54 ` Fabian Ruch
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=xmqq7fsu6ek4.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=bafain@gmail.com \
--cc=git@vger.kernel.org \
--cc=hordp@cisco.com \
--cc=johannes.schindelin@gmx.de \
--cc=phil.hord@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.