All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael J Gruber <git@drmicha.warpmail.net>
To: Jay Soffian <jaysoffian@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>,
	John Tapsell <johnflux@gmail.com>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: git rebase -i
Date: Fri, 20 Feb 2009 12:02:17 +0100	[thread overview]
Message-ID: <499E8DB9.5030505@drmicha.warpmail.net> (raw)
In-Reply-To: <76718490902191626u2202ed38xf63111b6a2758206@mail.gmail.com>

Jay Soffian venit, vidit, dixit 20.02.2009 01:26:
> On Thu, Feb 19, 2009 at 7:11 PM, Junio C Hamano <gitster@pobox.com> wrote:
> 
>>> $ git rebase -i -10
>>> $ git rebase -i -n -10
>> The syntax would certainly imply a different semantics from giving
>> HEAD~10.  How would you compute the set of commits to rebase sanely when
>> you have merges after your 10th direct parent commit?
> 
> I didn't mean to suggest that -10 and HEAD~10 are the same thing.
> 
> I would expect -10 to act the same when given to rebase as it does
> when given to format-patch. In both cases, you are asking the command
> for a set of commits.
> 
> But as I said, I don't exactly know what -10 means to format-patch if
> there are merge commits because I've never tried to use it in such a
> context.
> 
> j.

I guess it means exactly what

git rev-list -10 HEAD

means. And that would also be the easy way to implement it.

BUT: The fact that it's not obvious what "-10" is in non-linear
situations is the reason why it's probably not a good idea for r-b-i. If
you want to rebase you need a clear picture of the revision graph. If
you have one you know where to rebase from, and how to say so using
HEAD~5 and such. If you don't have one then using an option like -10
could be dangerous. And in a linear situation, -10 is equivalent to
HEAD~10 (+-1 ...).

Michael

      reply	other threads:[~2009-02-20 11:03 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-19  9:21 git rebase -i John Tapsell
2009-02-19  9:36 ` Wincent Colaiuta
2009-02-19  9:55   ` John Tapsell
2009-02-19  9:59     ` Wincent Colaiuta
2009-02-19 10:11       ` Jeff King
2009-02-19 10:15         ` Wincent Colaiuta
2009-02-19 10:20           ` Jeff King
2009-02-19 14:57             ` Theodore Tso
2009-02-19  9:50 ` Teemu Likonen
2009-02-19  9:52   ` John Tapsell
2009-02-19 14:02     ` Sitaram Chamarty
2009-02-19 14:24       ` John Tapsell
2009-02-23  0:32     ` Stephan Beyer
2009-02-19 10:00 ` Pieter de Bie
2009-02-19 10:09   ` Junio C Hamano
2009-02-19 16:12     ` Marc Branchaud
2009-02-19 17:53       ` Nazri Ramliy
2009-02-19 10:01 ` Thomas Rast
2009-02-19 10:03   ` John Tapsell
2009-02-19 10:07 ` Jeff King
2009-02-19 20:55 ` Jay Soffian
2009-02-19 21:04   ` Johannes Schindelin
2009-02-19 21:07     ` Jay Soffian
2009-02-19 23:53   ` Giuseppe Bilotta
2009-02-20  0:07     ` Johannes Schindelin
2009-02-20  0:11   ` Junio C Hamano
2009-02-20  0:26     ` Jay Soffian
2009-02-20 11:02       ` Michael J Gruber [this message]

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=499E8DB9.5030505@drmicha.warpmail.net \
    --to=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jaysoffian@gmail.com \
    --cc=johnflux@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.