Git development
 help / color / mirror / Atom feed
From: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>,
	git@vger.kernel.org, Ramkumar Ramachandra <artagnon@gmail.com>
Subject: Re: [PATCH] rebase: learn --discard subcommand
Date: Sun, 29 May 2011 09:14:50 -0400 (EDT)	[thread overview]
Message-ID: <alpine.DEB.2.00.1105290850340.28815@debian> (raw)
In-Reply-To: <7vpqn2psjv.fsf@alter.siamese.dyndns.org>

On Sat, 28 May 2011, Junio C Hamano wrote:

> Martin von Zweigbergk <martin.von.zweigbergk@gmail.com> writes:
> 
> > ... I think Junio then
> > hinted that he sometimes wished that he could abort rebase without
> > moving to anywhere else at all, which is what this patch implements.
> 
> I am not opposed to this particular patch, but thinking about a bigger
> picture, I am not sure if we want to solve it this way.
> 
> We have multiple "sequence" operations that want to do things in multiple
> steps, each of which can stop and give control back to the user, while
> leaving some information in the .git directory for it to know where it was
> when resuming. I think "am" knows about what "rebase" does (and
> vice-versa) so it can detect an attempt to run it while "rebase" is in
> still progress and refuse to continue to limit the damage, but if we have
> N such "sequence" commands that want to refrain from interfering with each
> other, and want to offer an advice to abort the in-progress operation
> initiated by other commands, that would mean we would need N * N pieces of
> logic to detect other's in-limbo state and offer advices, which would not
> scale.

Makes sense. I think someone once suggested to have a .git/inprogress
directory that would contain some basic information that could be used
to diagnose in a generic way what operation might be in progress.

> A user who is given back the control from a "sequence" operation may be
> confused either (1) immediately after such an event (often some sort of
> merge conflict) or (2) much later after first abandoning the working tree
> altogether and taking a walk and then coming back to continue working
> while forgetting what he was doing. Such a user may want to say "I know I
> am in a strange state, give me a state that I can work from, at this point
> I do not care about continuing what I was originally doing". The user may
> probably not know if "git rebase" was in progress or "git cherry-pick"
> was.

Maybe the recent patch [1] about adding information to git status
about any ongoing operation would help. I'm not sure, but I think I
would personally be a bit hesitant to cancel the current sequence
operation without first checking what it was. OTOH, if I don't even
remember starting a rebase operation, maybe knowing whether it was a
rebase or an am operation might not help much. But if the message from
git status would actually say something like "rebase in progress:
[2/3] War on nbsp: a bit of retreat", then that might help more in
making a decision to cancel or not.


 [1] http://thread.gmane.org/gmane.comp.version-control.git/172919

  parent reply	other threads:[~2011-05-29 13:19 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-28  2:58 [PATCH] rebase: learn --discard subcommand Martin von Zweigbergk
2011-05-28 13:15 ` Ramkumar Ramachandra
2011-05-29 12:50   ` Martin von Zweigbergk
2011-05-28 18:51 ` Junio C Hamano
2011-05-28 20:26   ` Tim Mazid
2011-05-28 22:50     ` Jonathan Nieder
2011-05-29 13:14   ` Martin von Zweigbergk [this message]
2011-05-29 13:41     ` Jakub Narebski
2011-05-30  4:50   ` Michael Haggerty
2011-05-28 23:08 ` Jonathan Nieder
2011-05-29  9:30   ` Tim Mazid
2011-05-29 17:28   ` Martin von Zweigbergk
2011-05-29 18:58     ` Jonathan Nieder
2011-05-30  4:46   ` Michael Haggerty
2011-05-30  5:14     ` Tim Mazid
2011-05-30  8:44       ` Michael Haggerty
2011-05-30  5:01   ` Miles Bader

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=alpine.DEB.2.00.1105290850340.28815@debian \
    --to=martin.von.zweigbergk@gmail.com \
    --cc=artagnon@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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