Re: [PATCH] describe: add tests for unusual graphs

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

 



On 2016-12-09 17:12, Junio C Hamano wrote:
> Quinn Grier <quinn@xxxxxxxxxxxxxx> writes:
> 
>> git describe may give incorrect results if there are backdated commits
>> or multiple roots. This commit adds two test_expect_failure tests that
>> demonstrate these problems.
> 
> I am not sure if this is a good patch to take.  test_expect_failure
> is to demonstrate an incorrect behaviour that we wish to correct
> later, but I do not think these demonstrate incorrect behaviours to
> begin with.
> 
> For example, the latter one seems to expect that by asking to
> describe D in this picture
> 
>> +#
>> +# A---B*--D master
>> +#        /
>> +#       C* other
>> +#
> 
> you seem to expect the description is based on B.  
> 
> It is not at all clear why it is incorrect if the description were
> made based on C.  If D were described relative to A, ignoring B,
> then I understand why that result is incorrect and I would agree
> that describing D in terms of B is more correct.  But I do not think
> that is what the test is trying to demonstrate.
> 
> But it is hard to guess only from looking at the test and the
> proposed log message, because it does not say what makes you think
> the behaviour you saw was incorrect.
> 

I thought the behavior was incorrect because of the following paragraph
from the documentation for git describe:

      If multiple tags were found during the walk then the tag
      which has the fewest commits different from the input
      commit-ish will be selected and output. Here fewest commits
      different is defined as the number of commits which would be
      shown by git log tag..input will be the smallest number of
      commits possible.



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