From: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
To: Eric Sunshine <sunshine@sunshineco.com>
Cc: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>,
"Git List" <git@vger.kernel.org>, "Jeff King" <peff@peff.net>,
"Philip Oakley" <philipoakley@iee.org>
Subject: Re: [PATCH 2/3] rebase: accept -<number> as another way of saying HEAD~<number>
Date: Sun, 02 Mar 2014 16:55:27 +0100 [thread overview]
Message-ID: <vpqlhwsr3ww.fsf@anie.imag.fr> (raw)
In-Reply-To: <CAPig+cSFWT6kwZUFFUE3=TcfHRUJnx54+fcZCzJwmOSJKFsYeA@mail.gmail.com> (Eric Sunshine's message of "Sun, 2 Mar 2014 03:55:01 -0500")
Eric Sunshine <sunshine@sunshineco.com> writes:
> On Sun, Mar 2, 2014 at 3:53 AM, Eric Sunshine <sunshine@sunshineco.com> wrote:
>> On Sat, Mar 1, 2014 at 9:53 PM, Nguyễn Thái Ngọc Duy <pclouds@gmail.com> wrote:
>>> This is "rev-list style", where people can do "git rev-list -3" in
>>> addition to "git rev-list HEAD~3". A lot of commands are driven by the
>>> revision machinery and also accept this form. This addition to rebase
>>> is just for convenience.
>>
>> I'm seeing some pretty strange results with this. If I use -1, -2, or
>> -3 then it rebases the expected commits, however, -4 gives me 9
>> commits, and -5 rebases 35 commits. Am I misunderstanding how this
>> works?
>
> Nevermind. I wasn't paying attention to the fact that I was attempting
> to rebase merges.
Your remark is actually interesting. Most (all?) Git commands taking
-<n> as parameters act on n commits, regardless of merges.
So, this commit creates an inconsistency between e.g. "git log -3" (show
last 3 commits) and "git rebase -3" (rebase up to HEAD~3, but there may
be more commits in case there are merges).
I don't have a better proposal, but at least the inconsistancy should be
documented (e.g. "note that this is different from what other commands
like 'git log' do when used with a -<number> option since ..." in the
manpage).
--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
next prev parent reply other threads:[~2014-03-02 15:56 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-27 13:01 [PATCH/RFC] rebase: new convenient option to edit a single commit Nguyễn Thái Ngọc Duy
2014-02-27 13:52 ` Matthieu Moy
2014-02-28 6:58 ` Jeff King
2014-02-28 7:34 ` Duy Nguyen
2014-02-28 7:38 ` Jeff King
2014-02-28 17:14 ` Philip Oakley
2014-03-02 2:53 ` [PATCH 0/3] rebase's convenient options Nguyễn Thái Ngọc Duy
2014-03-02 2:53 ` [PATCH 1/3] rev-parse: support OPT_NUMBER_CALLBACK in --parseopt Nguyễn Thái Ngọc Duy
2014-03-04 18:28 ` Junio C Hamano
2014-03-02 2:53 ` [PATCH 2/3] rebase: accept -<number> as another way of saying HEAD~<number> Nguyễn Thái Ngọc Duy
2014-03-02 8:37 ` Eric Sunshine
2014-03-02 8:45 ` Duy Nguyen
2014-03-02 8:53 ` Eric Sunshine
2014-03-02 8:55 ` Eric Sunshine
2014-03-02 15:55 ` Matthieu Moy [this message]
2014-03-03 9:16 ` Michael Haggerty
2014-03-03 9:37 ` Matthieu Moy
2014-03-03 10:04 ` Duy Nguyen
2014-03-03 10:11 ` David Kastrup
2014-03-03 10:12 ` Matthieu Moy
2014-03-03 10:13 ` Jeff King
2014-03-03 21:48 ` Junio C Hamano
2014-03-03 22:39 ` Matthieu Moy
2014-03-03 21:44 ` Junio C Hamano
2014-03-02 2:53 ` [PATCH 3/3] rebase: new convenient option to edit a single commit Nguyễn Thái Ngọc Duy
2014-03-02 9:04 ` Eric Sunshine
2014-03-02 9:09 ` Eric Sunshine
2014-03-03 10:10 ` Michael Haggerty
2014-03-03 10:15 ` Duy Nguyen
2014-03-03 10:37 ` David Kastrup
2014-03-03 20:28 ` Eric Sunshine
2014-03-04 2:08 ` Duy Nguyen
2014-03-04 8:59 ` Michael Haggerty
2014-03-04 10:24 ` Duy Nguyen
2014-03-04 13:11 ` Michael Haggerty
2014-03-04 18:37 ` Junio C Hamano
2014-03-09 2:49 ` [PATCH/RFC] rebase: new convenient option to edit/reword/delete " Nguyễn Thái Ngọc Duy
2014-03-09 16:30 ` Matthieu Moy
2014-03-10 8:30 ` Michael Haggerty
2014-03-10 8:41 ` Matthieu Moy
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=vpqlhwsr3ww.fsf@anie.imag.fr \
--to=matthieu.moy@grenoble-inp.fr \
--cc=git@vger.kernel.org \
--cc=pclouds@gmail.com \
--cc=peff@peff.net \
--cc=philipoakley@iee.org \
--cc=sunshine@sunshineco.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.