Subject: Re: Different behaviour of rebase -i

From: Caio Marcelo de Oliveira Filho <[email-masked]>
Date: Thu, 09 Oct 2008 20:25:11 -0300

"Leonardo Sobral Cunha" <[email-masked]> 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 <[email-masked]>
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 <[email-masked]>
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