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

Re: [PATCHv4 2/2] pull --rebase: Avoid spurious conflicts and reapplying unnecessary patches

From
Elijah Newren <newren@gmail.com>
Date
Aug 12, 2010, 20:19 UTC
Message-ID
<AANLkTimoB=__-FmuFYa_rKqMjoYwWQS9hzziuk9Jseyx@mail.gmail.com>
In-Reply-To
<AANLkTimHiYUPyNTtT4SwapqN8YZGB1wjxJPwTTaPZhEa@mail.gmail.com>
Hi,
Thanks for the review and comments!

On Thu, Aug 12, 2010 at 7:34 AM, Santi Béjar <santi@agolina.net> wrote: <snip>

> All this makes sense.
>
> But can you explain when it happens? One possibility is when you don't
> fork from the tracking branch as in:

That's one possibility. Patch 1/2 in this thread contains testcases for two others. Another possibility is having your patches get upstream by some alternative route (e.g. pulling your changes to a third machine, pushing from there, and then going back to your original machine and trying to pull --rebase).

Show 6 quoted lines
> Subject: Difference between pull --rebase and fetch+rebase
> Message-ID: <27059158.post@talk.nabble.com>
> From: martinvz <martin.von.zweigbergk@gmail.com>
>
> and this patch should also fix martinvz's issue (I've CC martinvz, can
> you test this patch? Thanks).

Since you've cc'd martinvz, I'll note for his benefit that in the thread you reference above, you stated,

"By the way, when Git tries to apply these two commits it should detect that they are already applied so it should do nothing, isn't it?"

The answer is no, it won't detect they are already applied, as explained in the commit message that started the current thread. (If git did detect the changes were already applied, this bug would have been innocuous.)

> Can you refer to commits with something like this?
>
> c85c792 (pull --rebase: be cleverer with rebased upstream branches, 2008-01-26)
Sure, I'll start doing that.
> You've moved all the lines after the call to "git fetch". It changes
> the behavior when the reflog is not enabled, as the old value of
> remoteref is lost.

Doh. That's what I get for trying to 'clean up' some code and put all the references to setting oldremoteref together. I should have stuck with my original 7-line addition patch. I'll resend the simplified patch.

Elijah
Previous: Santi BéjarNext: Santi Béjar
Message 9 of 13 in “[PATCHv4 0/2] Fix spurious conflicts with pull --rebase”
  1. Elijah NewrenAug 12, 2010
  2. 1/2 t5520-pull: Add testcases showing spurious conflicts from git pull --rebaseElijah Newren, Aug 12, 2010
  3. 2/2 pull --rebase: Avoid spurious conflicts and reapplying unnecessary patchesElijah Newren, Aug 12, 2010
  4. Santi BéjarAug 12, 2010
  5. Santi BéjarAug 12, 2010
  6. Santi BéjarAug 12, 2010
  7. Elijah NewrenAug 12, 2010
  8. Santi BéjarAug 12, 2010
  9. Elijah NewrenAug 12, 2010
  10. Santi BéjarAug 12, 2010
  11. Santi BéjarAug 12, 2010
  12. Junio C HamanoAug 12, 2010
  13. Elijah NewrenAug 13, 2010

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.