Re: [PATCH v2 2/7] add tests for rebasing with patch-equivalence present

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

 



On Thu, May 30, 2013 at 12:30 AM, Martin von Zweigbergk
<martinvonz@xxxxxxxxx> wrote:
> On Wed, May 29, 2013 at 12:09 AM, Johannes Sixt <j.sixt@xxxxxxxxxxxxx> wrote:
>> Am 5/29/2013 8:39, schrieb Martin von Zweigbergk:
>>> +#       f
>>> +#      /
>>> +# a---b---c---g---h
>>> +#      \
>>> +#       d---G---i
>> ...
>>> +test_run_rebase () {
>>> +     result=$1
>>> +     shift
>>> +     test_expect_$result "rebase $* --onto drops patches in onto" "
>>> +             reset_rebase &&
>>> +             git rebase $* --onto h f i &&
>>> +             test_cmp_rev h HEAD~2 &&
>>> +             test_linear_range 'd i' h..
>>
>> Isn't this expectation wrong? The upstream of the rebased branch is f, and
>> it does not contain G. Hence, G should be replayed. Since h is the
>> reversal of g, the state at h is the same as at c, and applying G should
>> succeed (it is the same change as g). Therefore, I think the correct
>> expectation is:
>>
>>                 test_linear_range 'd G i' h..
>
> Good question! It is really not obvious what the right answer is. Some
> arguments in favor of dropping 'G':

I think the answer is obvious; G should not be dropped. Maybe it made
sense to drop g in upstream, but d fixes an issue, and it makes sense
to apply G on upstream.

Git should not make any assumptions, if the user wants G to be
dropped, he can easily do that by himself.

I don't think it's easy to implement that code-wise, but I think the
ideal behavior is clear.

-- 
Felipe Contreras
--
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]