git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Different behaviour of rebase -i

From
CFCaio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
Date
Oct 9, 2008, 23:25 UTC
Message-ID
<m3vdw1e4h4.fsf@openbossa.org>
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
Previous: Leonardo Sobral CunhaNext: Johannes Schindelin
Message 2 of 4 in “Different behaviour of rebase -i”
  1. Leonardo Sobral CunhaOct 9, 2008
  2. Caio Marcelo de Oliveira FilhoOct 9, 2008
  3. Johannes SchindelinOct 10, 2008
  4. rebase -i: do not fail when there is no commit to cherry-pickJohannes Schindelin, Oct 10, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.