From: Junio C Hamano <gitster@pobox.com>
To: Adam Roben <aroben@apple.com>
Cc: git@vger.kernel.org, Johannes Schindelin <Johannes.Schindelin@gmx.de>
Subject: Re: Bug in git rebase -i where <upstream> is "HEAD" in 1.5.4?
Date: Thu, 07 Feb 2008 15:32:44 -0800 [thread overview]
Message-ID: <7vlk5wmjfn.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <D94A5309-3EB0-46FA-9114-D11376585DBB@apple.com> (Adam Roben's message of "Thu, 07 Feb 2008 16:47:27 -0500")
Adam Roben <aroben@apple.com> writes:
> I've discovered a difference in behavior between `git rebase` and
> `git rebase -i`, and I believe the behavior exhibited by `git rebase -
> i` is incorrect and should be changed to match `git rebase`. The
> behavior difference occurs when running the command in the form:
>
> git rebase [-i] <upstream> <branch>
>
> If <upstream> is "HEAD", `git rebase` seems to perform these
> (correct) steps:
>
> A=$(git rev-parse HEAD)
> git checkout <branch>
> git rebase $A
Yes, I remember writing that side carefully, taking exactly this
issue into account.
> However, `git rebase -i` seems to perform these (incorrect) steps:
Yeah, I see that interactive side is sloppier. In
git-rebase--interactive.sh, if you move
HEAD=$(git rev-parse --verify HEAD) || die "No HEAD?"
UPSTREAM=$(git rev-parse --verify "$1") || die "Invalid base"
around l.481 up so that they come before if test ! -z "$2",
you would be Ok, although I didn't test it.
prev parent reply other threads:[~2008-02-07 23:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-07 21:47 Bug in git rebase -i where <upstream> is "HEAD" in 1.5.4? Adam Roben
2008-02-07 23:32 ` Junio C Hamano [this message]
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=7vlk5wmjfn.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=aroben@apple.com \
--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).