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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 12, 2010 at 11:02 PM, Elijah Newren <newren@xxxxxxxxx> wrote:
> Hi,
>
> On Thu, Aug 12, 2010 at 8:37 AM, Santi Béjar <santi@xxxxxxxxxxx> 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.

>
>> @@ -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@xxxxxxxxxxx>

Thanks,
Santi
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]