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

Re: [RFC/PATCH 0/2] Test the Git version string

From
Philip Oakley <philipoakley@iee.org>
Date
Apr 16, 2013, 07:25 UTC
Message-ID
<99AE5E981E2547B6A71A4D77B17167B9@PhilipOakley>
In-Reply-To
<7vli8k4lnj.fsf@alter.siamese.dyndns.org>
From: "Junio C Hamano" <gitster@pobox.com>
Sent: Monday, April 15, 2013 2:39 AM
Show 18 quoted lines
> "Philip Oakley" <philipoakley@iee.org> writes:
>
>>> If the "parsing" is done for white/blacklist purposes, is there a
>>> need to straight-jacket the verison string format like this series?
>>
>> The purpose is to document what we felt we could guarantee, and that
>> which was open to variation, so that those, like the Git-Gui, can
>> code
>> in a sensible check for the version. Two digits (X.Y) should pass the
>> existing Git Gui check.
>>
>> I'll drop the length limit, and keep to an X.Y check
>>
>> Is the end of t0000-basic.sh a sensible place for the check?
>
> Sorry, but I still do not understand what you are trying to achieve.
>
> What kind of benefit are you envisioning out of this?
The purpose of tests is to detect mistakes and spot regressions.

A change to the 'git version X.Y.z' string would be a regression, as I spotted earlier, as it conflicts with expectations of standard programmes such as git-gui.

Show 24 quoted lines
>For a future
> version, people would not know what incompatibilities it would
> introduce, so
>
> case "$(git version)" in
> "git verison"[2-9].*)
>        echo unsupported version
>                exit 1
>                ;;
> esac
>
> is a nonsense check.
>
> For all released versions, people know how they looked like
> and we
> do not have anything further to specify.  Git 1.5.0 will forever
> identify itself as:
>
> $ git version
>        git version 1.5.0
>
> Worse yet, for an untagged version, you may get something like
>
> git version 1.8.2.1-515-g78d2372

However, if it passes the test [all the tests], one expects it will be reasonably (almost completely) compatibility with external expectations, such as those of git gui.

The questions I'm posing is from the other direction - use of tests for quality control.

>
> and it may or may not behave the same way as 1.8.2.1 depending on
> what trait you are interested in.
That will depend on the tests if [deliberately?] failed.
I'll tidy up the patches and commit meesage and see how it looks then.
Philip
Previous: Junio C HamanoNext: Junio C Hamano
Message 7 of 11 in “Test the Git version string”
  1. 0/2 Test the Git version stringPhilip Oakley, Apr 14, 2013
  2. 1/2 test git version stringPhilip Oakley, Apr 14, 2013
  3. 2/2 Doc: State the exact git version stringPhilip Oakley, Apr 14, 2013
  4. Junio C HamanoApr 14, 2013
  5. Philip OakleyApr 14, 2013
  6. Junio C HamanoApr 15, 2013
  7. Philip OakleyApr 16, 2013
  8. Junio C HamanoApr 16, 2013
  9. David AguilarApr 16, 2013
  10. Junio C HamanoApr 16, 2013
  11. Philip OakleyApr 16, 2013

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.