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
SBSanti Béjar <santi@agolina.net>
Date
Aug 12, 2010, 22:51 UTC
Message-ID
<AANLkTinJK3YZ0sojnpiH0KZvFFC38X8LFr3U1ZrU_UXG@mail.gmail.com>
In-Reply-To
<AANLkTinqW4h-SG21ZEAvhKEPJ46WfBRyYboUsfXjy7Zn@mail.gmail.com>
On Thu, Aug 12, 2010 at 11:02 PM, Elijah Newren <newren@gmail.com> wrote:
Show 21 quoted lines
> Hi,
>
> On Thu, Aug 12, 2010 at 8:37 AM, Santi Béjar <santi@agolina.net> wrote:
>> diff --git c/git-pull.sh w/git-pull.sh
>> index a09a44e..c1617d5 100755
>> --- c/git-pull.sh
>> +++ w/git-pull.sh
>> @@ -214,7 +214,10 @@ test true = "$rebase" && {
>>        do
>>                if test "$reflog" = "$(git merge-base $reflog $curr_branch)"
>>                then
>> -                       oldremoteref="$reflog"
>> +                       if test "$reflog" != $(git merge-base $reflog
>> $remoteref)
>> +                       then
>> +                               oldremoteref="$reflog"
>> +                       fi
>
> How does this help?  I've been trying to scratch my head trying to
> figure out a case where it could affect the outcome, and am struggling
> to come up with one.
Me too :)

The only case where it makes a difference, it is wrong. I was trying to be extra cautious, but ... too much in this case.

Show 17 quoted lines
>
>> @@ -273,6 +276,14 @@ then
>>        exit
>>  fi
>>
>> +if test true = "$rebase"
>> +then
>> +       if test "$oldremoteref" = $(git merge-base $oldremoteref $merge_head)
>> +       then
>> +               unset oldremoteref
>> +       fi
>> +fi
>> +
>
> This was indeed my original patch, then I just (incorrectly, as you
> pointed out) moved other bits of code to be with this so that the
> determination of oldremoteref was all in one place.
OK. Then for your original patch:
Acked-by: Santi Béjar <santi@agolina.net>

Thanks, Santi

Previous: Elijah NewrenNext: Elijah Newren
Message 8 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.