From: martinvz <martin.von.zweigbergk@gmail.com>
To: git@vger.kernel.org
Subject: Re: Difference between pull --rebase and fetch+rebase
Date: Thu, 7 Jan 2010 10:44:24 -0800 (PST) [thread overview]
Message-ID: <1262889864880-4268064.post@n2.nabble.com> (raw)
In-Reply-To: <adf1fd3d1001070800k6fa501fej39b84f849b7e5b50@mail.gmail.com>
Thanks for your post, Santi. I can not share my repository since it is a
project at work. I was troubleshooting a bit myself and found the following
section in git-pull.sh:
oldremoteref="$(git rev-parse -q --verify "$remoteref")" &&
for reflog in $(git rev-list -g $remoteref 2>/dev/null)
do
if test "$reflog" = "$(git merge-base $reflog $curr_branch)"
then
oldremoteref="$reflog"
break
fi
done
Why is it that reflog entries are allowed to override the remote reference?
Thanks,
Martin
Santi Béjar-2 wrote:
>
> On Thu, Jan 7, 2010 at 1:23 PM, martinvz
> <martin.von.zweigbergk@gmail.com> wrote:
>>
>> I have a branch configured to track a remote branch by rebasing. I
>> excepted
>> that "git pull" would therefore be equivalent to fetching from the remote
>> repository followed by rebasing the remote branch, but it isn't. When
>> doing
>> "git rebase <remote>/<branch>", it applies only the commits after the
>> merge
>> base. When doing "git pull", it tries to apply two more commits (the two
>> commits preceding the merge base). Why is this?
>>
>> I get the same result even if I do "git pull --rebase <remote> <branch>",
>> it
>> doesn't seem to have anything to do with incorrect configuration of the
>> branch.
>
> Yes, both should do the same (at least when upstream is not rebased).
> Can you provide a test case or instructions to reproduce the behavior?
>
> Thanks,
> Santi
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
--
View this message in context: http://n2.nabble.com/Difference-between-pull-rebase-and-fetch-rebase-tp4266164p4268064.html
Sent from the git mailing list archive at Nabble.com.
next prev parent reply other threads:[~2010-01-07 18:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-07 12:23 Difference between pull --rebase and fetch+rebase martinvz
2010-01-07 12:58 ` martinvz
2010-01-07 16:00 ` Santi Béjar
2010-01-07 18:44 ` martinvz [this message]
2010-01-07 22:33 ` Santi Béjar
2010-01-07 23:38 ` martinvz
2010-01-08 11:05 ` Santi Béjar
2010-01-08 19:41 ` martinvz
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=1262889864880-4268064.post@n2.nabble.com \
--to=martin.von.zweigbergk@gmail.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).