git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "SZEDER Gábor" <szeder@ira.uka.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: Anders Melchiorsen <mail@cup.kalibalik.dk>,
	git@vger.kernel.org, Johannes.Schindelin@gmx.de
Subject: Re: [RFC PATCH] Make the rebase edit mode really end up in an edit state
Date: Thu, 15 Jan 2009 16:35:29 +0100	[thread overview]
Message-ID: <20090115153529.GA13961@neumann> (raw)
In-Reply-To: <7vfxjlxuu5.fsf@gitster.siamese.dyndns.org>

On Wed, Jan 14, 2009 at 04:43:14PM -0800, Junio C Hamano wrote:
> I've always had trouble with the instruction we give for splitting one
> commit into two using the interactive rebase in the documentation, as it
> always had a strong "Huh?" effect on me when it suddenly starts talking
> about doing a "git reset HEAD^"; I suspect your change may improve this
> situation quite a bit.

I think we might want do differentiate editing a commit (modifying
either the commit message or the patch or both) or splitting a commit.

The first is served well with the current 'edit' rebase command IMHO.
I don't really see the point of the additional 'git reset --soft
HEAD^'.

 * If you want to edit the commit message only, then you are
   better off with 'git commit --amend', because it preserves the
   previous commit message.  But with 'git reset --soft HEAD^' and
   'git commit' the commit message is "lost"; you have to use 'git
   commit -c ORIG_HEAD' instead, which is not that straightforward
   (and we don't have completion support for it).

 * If you want to modify the patch, too, then you would have to use
   'git add' anyway, regardless of whether there was a 'git reset
   --soft HEAD^', or not.  The only benefit of that 'reset' I'm seeing
   is that in that case 'git diff --cached' would show all the changes
   that would be committed; without the 'reset' 'git diff --cached
   HEAD^' is needed.

   But I'm not sure whether that benefit would offset the confusion of
   one more rebase command with just slightly different meaning.

For the second we could introduce a new rebase command like 'split',
which would do the same as 'edit' but would also perform that 'git
reset HEAD^' mentioned in the documentation automatically.  Or perhaps
it could be called 'divide', since the 's' abbreviation for 'split' is
already taken by 'squash'.  (Or maybe use capital 'S' for 'split'?
might be confusing...)


Regards,
Gábor

  parent reply	other threads:[~2009-01-15 15:52 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-15  0:27 [RFC PATCH] Make the rebase edit mode really end up in an edit state Anders Melchiorsen
2009-01-15  0:43 ` Junio C Hamano
2009-01-15  2:49   ` Boyd Stephen Smith Jr.
2009-01-15  4:10     ` Miles Bader
2009-01-15  5:00       ` Boyd Stephen Smith Jr.
2009-01-15  6:13       ` Junio C Hamano
2009-01-15 12:24       ` Johannes Schindelin
2009-01-15 15:35   ` SZEDER Gábor [this message]
2009-01-15 22:09     ` Junio C Hamano
2009-01-15 22:20       ` Sverre Rabbelier
2009-01-15 22:59         ` SZEDER Gábor
2009-01-16  0:11           ` Björn Steinbrink
2009-01-16  1:34             ` Johannes Schindelin
2009-01-18  1:24             ` Anders Melchiorsen
2009-01-16  1:09           ` Junio C Hamano
2009-01-16 12:10             ` Johannes Schindelin
2009-01-15  0:49 ` Stephan Beyer
2009-01-15  0:53 ` Johannes Schindelin
2009-01-15  7:35   ` Johannes Sixt
2009-01-15 10:01     ` Johan Herland
2009-01-15 11:52       ` Sverre Rabbelier
2009-01-15 12:36         ` Johannes Schindelin
2009-01-15 12:44           ` Adeodato Simó
2009-01-15 13:41             ` Johannes Schindelin
2009-01-15 13:41               ` Sverre Rabbelier
2009-01-15 13:57                 ` Stephan Beyer
2009-01-15 14:02                   ` Johannes Schindelin
2009-01-15 13:43               ` Adeodato Simó
2009-01-15 12:45           ` Sverre Rabbelier
2009-01-15 13:42             ` Johannes Schindelin
2009-01-15 13:56               ` Sverre Rabbelier
2009-01-15 16:59             ` Junio C Hamano
2009-01-15 17:16               ` Sverre Rabbelier
2009-01-15 18:21               ` Johannes Schindelin
2009-01-15 18:46                 ` Johan Herland
2009-01-15 18:53                   ` Anders Melchiorsen
2009-01-15 19:28                     ` Johannes Schindelin
2009-01-15 19:27                   ` Wincent Colaiuta
2009-01-15 20:26                     ` Jay Soffian
2009-01-15 21:58                       ` Wincent Colaiuta
2009-01-16  9:50                       ` Johan Herland
2009-01-16 10:27                         ` Anders Melchiorsen
2009-01-16 10:58                           ` Johan Herland
2009-01-16 12:42                             ` SZEDER Gábor
2009-01-16 12:57                               ` Johannes Schindelin
2009-01-16 13:27                                 ` SZEDER Gábor
2009-01-16 14:28                                   ` Wincent Colaiuta
2009-01-16 13:12                         ` Sverre Rabbelier
2009-01-16 17:26                           ` Stephan Beyer
2009-01-16 21:06                             ` Johannes Schindelin
2009-01-15 12:52           ` Pieter de Bie
2009-01-15 12:55             ` Sverre Rabbelier
2009-01-15 12:57           ` Pieter de Bie
2009-01-15 13:46             ` Björn Steinbrink
2009-01-15 13:54         ` Johan Herland

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=20090115153529.GA13961@neumann \
    --to=szeder@ira.uka.de \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=mail@cup.kalibalik.dk \
    /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;
as well as URLs for NNTP newsgroup(s).