From: Quinn Grier <quinn@quinngrier.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] describe: add tests for unusual graphs
Date: Sat, 10 Dec 2016 00:47:50 -0600 [thread overview]
Message-ID: <dfc5172d-e87c-2c2f-dc7f-a6f7ccf0028e@quinngrier.com> (raw)
In-Reply-To: <xmqq60msr92w.fsf@gitster.mtv.corp.google.com>
On 2016-12-09 17:12, Junio C Hamano wrote:
> Quinn Grier <quinn@quinngrier.com> 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.
prev parent reply other threads:[~2016-12-10 6:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-09 13:11 [PATCH] describe: add tests for unusual graphs Quinn Grier
2016-12-09 23:12 ` Junio C Hamano
2016-12-10 6:47 ` Quinn Grier [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=dfc5172d-e87c-2c2f-dc7f-a6f7ccf0028e@quinngrier.com \
--to=quinn@quinngrier.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).