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

Re: [PATCH bc/hash-independent-tests-part-4] t: decrease nesting in test_oid_to_path

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 8, 2019, 17:22 UTC
Message-ID
<xmqqo90zfu7r.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<20190808093732.GA12257@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 12 quoted lines
> On Wed, Aug 07, 2019 at 11:56:14PM -0700, Jonathan Nieder wrote:
>
>> But a dash bug[*] causes it to instead expand to
>> 
>> 	/3456789...
>> 
>> The stream of symbols that makes up this function is hard for humans
>> to follow, too.  The complexity mostly comes from the repeated use of
>> the expression ${1#??} for the basename of the loose object.
>
> Yeah, both seem like good reasons to change this (and the patch looks
> good to me).
Good spottig.  Thanks.
Show 11 quoted lines
> +# Check whether the shell supports the "local" keyword. "local" is not
> +# POSIX-standard, but it is very widely supported by POSIX-compliant
> +# shells, and we rely on it within Git's test framework.
> +#
> +# If your shell fails this test, the results of other tests may be
> +# unreliable. You may wish to report the problem to the Git mailing
> +# list <git@vger.kernel.org>, as it could cause us to reconsider
> +# relying on "local".
>  test_expect_success 'verify that the running shell supports "local"' '
>  	x="notlocal" &&
>  	echo "local" >expected1 &&

Updated text reads well. Leaving the test in is still a very good idea.

Thanks.
Previous: SZEDER GáborNext: brian m. carlson
Message 7 of 17 in “Hash-independent tests, part 4”
  1. 00/10 Hash-independent tests, part 4brian m. carlson, Jun 28, 2019
  2. 01/10 t: add helper to convert object IDs to pathsbrian m. carlson, Jun 28, 2019
  3. t: decrease nesting in test_oid_to_pathJonathan Nieder, Aug 8, 2019
  4. Jeff KingAug 8, 2019
  5. brian m. carlsonAug 8, 2019
  6. SZEDER GáborAug 8, 2019
  7. Junio C HamanoAug 8, 2019
  8. brian m. carlsonAug 8, 2019
  9. 03/10 t1450: make hash size independentbrian m. carlson, Jun 28, 2019
  10. 04/10 t5000: make hash independentbrian m. carlson, Jun 28, 2019
  11. 02/10 t1410: make hash size independentbrian m. carlson, Jun 28, 2019
  12. 05/10 t6030: make test work with SHA-256brian m. carlson, Jun 28, 2019
  13. 06/10 t0027: make hash size independentbrian m. carlson, Jun 28, 2019
  14. 07/10 t0090: make test pass with SHA-256brian m. carlson, Jun 28, 2019
  15. 08/10 t1007: remove SHA1 prerequisitesbrian m. carlson, Jun 28, 2019
  16. 09/10 t1710: make hash independentbrian m. carlson, Jun 28, 2019
  17. 10/10 t2203: avoid hard-coded object ID valuesbrian m. carlson, Jun 28, 2019

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.