Re: [PATCH 1/1] pull --rebase=<type>: allow single-letter abbreviations for the type

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

 



Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> writes:

>> -	else if (!strcmp(value, "preserve"))
>> +	else if (!strcmp(value, "preserve") || !strcmp(value, "p"))
>>  		return REBASE_PRESERVE;
>> -	else if (!strcmp(value, "merges"))
>> +	else if (!strcmp(value, "merges") || !strcmp(value, "m"))
>>  		return REBASE_MERGES;
>> -	else if (!strcmp(value, "interactive"))
>> +	else if (!strcmp(value, "interactive") || !strcmp(value, "i"))
>>  		return REBASE_INTERACTIVE;
>
> Here 3 special cases are added...
> ...
>> +test_expect_success 'pull --rebase=i' '
>> ...
>> +'
>> +
>>  test_expect_success 'pull.rebase=invalid fails' '
>>  	git reset --hard before-preserve-rebase &&
>>  	test_config pull.rebase invalid &&
>
> ...but this test is only for 1/3. I haven't run this, but it looks like
> the tests will still pass if we remove --rebase=p and --rebase=m.

Good eyes.  It's not like that parsing these three is implemented
with one thing; in other words, it is not hard to break one without
breaking the other two.







[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]

  Powered by Linux