git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
To: git@vger.kernel.org
Subject: Re: Different behaviour of rebase -i
Date: Thu, 09 Oct 2008 20:25:11 -0300	[thread overview]
Message-ID: <m3vdw1e4h4.fsf@openbossa.org> (raw)
In-Reply-To: 6beb92080810091204n6df4338fs3b182194a8d6454e@mail.gmail.com


"Leonardo Sobral Cunha" <sobral@gmail.com> writes:
> Is this different behaviour of rebase -i expected or is this a bug?
> This is still happening in git version 1.6.0.2.443.g52e83

To illustrate the problem:

----8<----
~$ git --version
git version 1.6.0.2.514.g23abd3
~$ mkdir a
~$ cd a
~/a$ git init
Initialized empty Git repository in /home/cmarcelo/a/.git/

~/a$ touch A && git add A && git commit A -m "First commit"
Created initial commit d956e0c: First commit
 0 files changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 A

~/a$ touch B && git add B && git commit B -m "Second commit"
Created commit 7b6512d: Second commit
 0 files changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 B

~/a$ cd ..
~$ git clone a b
Initialized empty Git repository in /home/cmarcelo/b/.git/

~$ cd b
~/b$ git reset --hard HEAD~1
HEAD is now at d956e0c First commit

~/b$ git rebase -i origin/master
Nothing to do

~/b$ git show
commit d956e0ca33e10bac8a0a14200b1e13d84535d728
Author: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
Date:   Thu Oct 9 20:18:53 2008 -0300

    First commit

diff --git a/A b/A
new file mode 100644
index 0000000..e69de29

~/b$ git rebase origin/master
First, rewinding head to replay your work on top of it...
Fast-forwarded master to origin/master.
~/b$ git show
commit 7b6512d5f4b2c51753f4d06033651cee8e6d1460
Author: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
Date:   Thu Oct 9 20:19:11 2008 -0300

    Second commit

diff --git a/B b/B
new file mode 100644
index 0000000..e69de29
---->8----

Wasn't the first "rebase -i" supposed to get to "Second commit"?


-- 
Caio Marcelo de Oliveira Filho
OpenBossa Labs - INdT

  reply	other threads:[~2008-10-09 23:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-09 19:04 Different behaviour of rebase -i Leonardo Sobral Cunha
2008-10-09 23:25 ` Caio Marcelo de Oliveira Filho [this message]
2008-10-10 11:40 ` Johannes Schindelin
2008-10-10 11:42   ` [PATCH] rebase -i: do not fail when there is no commit to cherry-pick Johannes Schindelin

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=m3vdw1e4h4.fsf@openbossa.org \
    --to=caio.oliveira@openbossa.org \
    --cc=git@vger.kernel.org \
    /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).