All of lore.kernel.org
 help / color / mirror / Atom feed
* [BUG] rebase --onto doesn't abort properly
@ 2014-01-06 17:42 Ramkumar Ramachandra
  2014-01-06 18:44 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Ramkumar Ramachandra @ 2014-01-06 17:42 UTC (permalink / raw)
  To: Git List

Hi,

On the latest git, I noticed that a rebase --onto doesn't abort
properly. Steps to reproduce:

  # on some topic branch
  $ git rebase --onto master @~10
  ^C # quickly!
  $ git rebase --abort
  # HEAD is still detached

I tried going back a few revisions, and the bug seems to be very old;
I'm surprised I didn't notice it earlier.

Are others able to reproduce this?

Thanks.

Ram

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [BUG] rebase --onto doesn't abort properly
  2014-01-06 17:42 [BUG] rebase --onto doesn't abort properly Ramkumar Ramachandra
@ 2014-01-06 18:44 ` Junio C Hamano
  2014-01-06 18:55   ` Ramkumar Ramachandra
  0 siblings, 1 reply; 3+ messages in thread
From: Junio C Hamano @ 2014-01-06 18:44 UTC (permalink / raw)
  To: Ramkumar Ramachandra; +Cc: Git List

Ramkumar Ramachandra <artagnon@gmail.com> writes:

> Hi,
>
> On the latest git, I noticed that a rebase --onto doesn't abort
> properly. Steps to reproduce:
>
>   # on some topic branch
>   $ git rebase --onto master @~10
>   ^C # quickly!
>   $ git rebase --abort
>   # HEAD is still detached

I do not think --abort was designed to abort an uncontrolled stop
like ^C in the first place.  To allow that kind of "recovery", you
need to teach "rebase" to first record the state you would want to
go back to before doing anything, but then what happens if the ^C
comes when you are still in the middle of doing so?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [BUG] rebase --onto doesn't abort properly
  2014-01-06 18:44 ` Junio C Hamano
@ 2014-01-06 18:55   ` Ramkumar Ramachandra
  0 siblings, 0 replies; 3+ messages in thread
From: Ramkumar Ramachandra @ 2014-01-06 18:55 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Git List

Junio C Hamano wrote:
> I do not think --abort was designed to abort an uncontrolled stop
> like ^C in the first place.

Why not? All it requires is a reset --hard to
.git/rebase-apply/head-name, as usual, no?

> To allow that kind of "recovery", you
> need to teach "rebase" to first record the state you would want to
> go back to before doing anything, but then what happens if the ^C
> comes when you are still in the middle of doing so?

I'm a bit puzzled: doesn't rebase write_basic_state() as soon as it
starts? It's true that we can't recover from a ^C before that, but I
would expect to be able to recover after a ^C somewhere in the middle.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-01-06 18:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-06 17:42 [BUG] rebase --onto doesn't abort properly Ramkumar Ramachandra
2014-01-06 18:44 ` Junio C Hamano
2014-01-06 18:55   ` Ramkumar Ramachandra

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.