From: Eugene Sajine <euguess@gmail.com>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org, Eugene Sajine <euguess@gmail.com>
Subject: Re: [BUG] - git rebase -i performs rebase when it shouldn't?
Date: Mon, 12 Apr 2010 10:09:42 -0400 [thread overview]
Message-ID: <q2z76c5b8581004120709t860ff112i5dd057327b94ad0e@mail.gmail.com> (raw)
In-Reply-To: <y2s76c5b8581004110706p7b63900aqf90f9c1462a1f637@mail.gmail.com>
On Sun, Apr 11, 2010 at 10:06 AM, Eugene Sajine <euguess@gmail.com> wrote:
> I got your point about the HEAD which is by default get's added to the
> end of the command, so it becomes
>
> git rebase --onto master topic HEAD
>
> I will think about it it more.
>
> I'm pretty sure that i was surprised by the fact that i've got
> different behavior in interactive and non-interactive variants, but i
> will recheck.
>
> I forgot to mention it was in windows version of git.
> I will try to provide the printout of my actions tomorrow when i will
> get to this machine.
>
> Thanks a lot,
> Eugene
Here is the printout of my actions with some comments:
esajine@ESAJINEWWW /c/git_repos
$ mkdir test2; cd test2; git init; echo "initial" > 1.txt; git add .;
git commit -m "initial commit"; git checkout -b next; echo "commit
from next" > 2.txt; git add .; git commit -m "commit from next"; git
checkout -b topic; echo "commit from topic" > 3.txt; git add .; git
commit -m "commit from topic"
Initialized empty Git repository in c:/git_repos/test2/.git/
warning: LF will be replaced by CRLF in 1.txt
[master (root-commit) 89c5353] initial commit
warning: LF will be replaced by CRLF in 1.txt
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 1.txt
Switched to a new branch 'next'
warning: LF will be replaced by CRLF in 1.txt
warning: LF will be replaced by CRLF in 2.txt
[next cec1eeb] commit from next
warning: LF will be replaced by CRLF in 2.txt
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 2.txt
Switched to a new branch 'topic'
warning: LF will be replaced by CRLF in 1.txt
warning: LF will be replaced by CRLF in 2.txt
warning: LF will be replaced by CRLF in 3.txt
[topic 9975772] commit from topic
warning: LF will be replaced by CRLF in 3.txt
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 3.txt
esajine@ESAJINEWWW /c/git_repos/test2 (topic)
$ pwd
/c/git_repos/test2
esajine@ESAJINEWWW /c/git_repos/test2 (topic)
$ git status
# On branch topic
nothing to commit (working directory clean)
esajine@ESAJINEWWW /c/git_repos/test2 (topic)
$ git log
commit 9975772c641c438a0a77932c18c159e9551706ce
Author: Eugene Sajine <esajine@foo.com>
Date: Fri Apr 9 13:04:24 2010 -0400
commit from topic
commit cec1eebc8db042b1b8a1002b07767eac56884126
Author: Eugene Sajine <esajine@foo.com>
Date: Fri Apr 9 13:04:24 2010 -0400
commit from next
commit 89c5353c9b0cfc476b323db11565ea210341469a
Author: Eugene Sajine <esajine@foo.com>
Date: Fri Apr 9 13:04:24 2010 -0400
initial commit
esajine@ESAJINEWWW /c/git_repos/test2 (topic)
$ git rebase master
Current branch topic is up to date.
<======= Really? Topic is actually based on next – what does this "up
to date" mean??
esajine@ESAJINEWWW /c/git_repos/test2 (topic)
$ git rebase --onto master topic
First, rewinding head to replay your work on top of it...
fatal: Not a range.
Nothing to do.
<======== topic..HEAD is not a range, agreed
esajine@ESAJINEWWW /c/git_repos/test2 (topic)
$ git rebase --onto master
fatal: Needed a single revision
invalid upstream
<========= fine
esajine@ESAJINEWWW /c/git_repos/test2 (topic)
$ git rebase --onto master next..topic
fatal: Needed a single revision
invalid upstream next..topic
<======== strange that this notation is not supported, considering
error above about the range
esajine@ESAJINEWWW /c/git_repos/test2 (topic)
$ git rebase -i --onto master topic
Successfully rebased and updated refs/heads/topic. <=== BUG – here it
printed me “noop” in file to edit, when I exited it should do nothing,
but it still did something and I double checked it.
esajine@ESAJINEWWW /c/git_repos/test2 (topic)
$ git rebase --onto master topic
Current branch topic is up to date.
esajine@ESAJINEWWW /c/git_repos/test2 (topic)
$ git log
commit 89c5353c9b0cfc476b323db11565ea210341469a
Author: Eugene Sajine <esajine@foo.com>
Date: Fri Apr 9 13:04:24 2010 -0400
initial commit
<====== topic now points to master, last commit from topic is
lost
esajine@ESAJINEWWW /c/git_repos
$ git version
git version 1.6.4.msysgit.0
Thanks,
Eugene
next prev parent reply other threads:[~2010-04-12 14:16 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-09 19:35 [BUG] - git rebase -i performs rebase when it shouldn't? Eugene Sajine
2010-04-10 4:26 ` Jeff King
2010-04-10 4:39 ` Junio C Hamano
2010-04-10 4:47 ` Jeff King
2010-04-10 19:58 ` Johannes Sixt
2010-04-11 10:15 ` Jeff King
2010-04-11 17:54 ` Johannes Sixt
2010-04-12 1:01 ` Jeff King
2010-04-12 10:50 ` Michal Vitecek
2010-04-12 17:39 ` Johannes Sixt
2010-04-10 22:10 ` Eugene Sajine
2010-04-11 10:22 ` Jeff King
2010-04-11 14:06 ` Eugene Sajine
2010-04-12 14:09 ` Eugene Sajine [this message]
2010-04-12 15:13 ` Johannes Sixt
2010-04-12 15:28 ` Eugene Sajine
2010-04-12 15:47 ` Johannes Sixt
2010-04-13 16:30 ` Eugene Sajine
2010-04-14 6:08 ` Johannes Sixt
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=q2z76c5b8581004120709t860ff112i5dd057327b94ad0e@mail.gmail.com \
--to=euguess@gmail.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
/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).