Re: [PATCH 5/8] rebase: preserve interactive todo file on checkout failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Oswald

On 23/03/2023 22:38, Oswald Buddenhagen wrote:
On Thu, Mar 23, 2023 at 07:31:04PM +0000, Phillip Wood wrote:
On 23/03/2023 16:22, Oswald Buddenhagen wrote:
Creating a suitable todo file is a potentially labor-intensive process,
so be less cavalier about discarding it when something goes wrong (e.g.,
the user messed with the repo while editing the todo).

I was thinking about this problem the other day in the context of rescheduling commands when they cannot be executed because they would overwrite an untracked file. My thought was that we should prepend a "reset" command to the todo list so that the checkout happened when the user continued the rebase.

so you basically want to convert the magic `onto` into an explicit todo command? i'm not sure what the advantage would be, and i certainly can think of disadvantages re. usability and backwards compat.

If the initial checkout of "onto" fails I want the rebase to stop so the user can try and fix the problem (usually remove an untracked file) and then run "git rebase --continue" to continue the rebase including the initial checkout. Adding a "reset" command to the beginning of the todo list when the initial checkout fails is one way of achieving that.

How does this patch ensure the checkout happens when the user continues the rebase?

the idea was never that the user --continue's. we're talking about a fatal error,

If it is a fatal error what is stopping the user from running "rebase --continue" and wreaking havoc? You seem to be expecting the user to know that they need to

 (1) run "git rebase --edit-todo" to save the todo list somewhere safe
 (2) run "git rebase --abort" to abort the rebase and restore any
     autostash. (Have you checked that --abort is safe to run when
     HEAD is not detached?)
 (3) fix whatever prevented the checkout from working
 (4) re-run "git rebase" and restore the saved todo list when prompted
     to edit it

It would be much more user friendly to simply allow them to fix the problem with the checkout and run "git rebase --continue"

Best Wishes

Phillip

and the patch's purpose is only to allow the user to salvage their work manually. it's an interesting question, though, esp. in light of patch 8/8 of this series.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux