git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 9, 2016, 23:12 UTC
Message-ID
<xmqq60msr92w.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20161209131141.3096-1-quinn@quinngrier.com>
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

Show 5 quoted lines
> +#
> +# 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.

Previous: Quinn GrierNext: Quinn Grier
Message 2 of 3 in “describe: add tests for unusual graphs”
  1. describe: add tests for unusual graphsQuinn Grier, Dec 9, 2016
  2. Junio C HamanoDec 9, 2016
  3. Quinn GrierDec 10, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.