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

Re: [Test Breakage 2.46.0-rc0] Test t0021.35 fails on NonStop

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Jul 14, 2024, 21:27 UTC
Message-ID
<CAPig+cS9PbV+o_f0EbHPqtG-azHqzu5CpDgB5h+tZ58iGd_B0g@mail.gmail.com>
In-Reply-To
<xmqqttgr9aeb.fsf@gitster.g>
On Sun, Jul 14, 2024 at 1:00 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 9 quoted lines
> Subject: doc: guide to use of "local" shell language construct
>
> The scripted Porcelain commands do not allow use of "local" because
> it is not universally supported, but we use it liberally in our test
> scripts, which means some POSIX compliant shells (like "ksh93") can
> not be used to run our tests.
>
> Document the status quo, and hint that we might want to change the
> situation in the fiture.
s/fiture/future/
Show 11 quoted lines
> Signed-off-by: Junio C Hamano <gitster@pobox.com>
> ---
> diff --git c/Documentation/CodingGuidelines w/Documentation/CodingGuidelines
> @@ -186,7 +186,9 @@ For shell scripts specifically (not exhaustive):
>   - Even though "local" is not part of POSIX, we make heavy use of it
>     in our test suite.  We do not use it in scripted Porcelains, and
>     hopefully nobody starts using "local" before they are reimplemented
> -   in C ;-)
> +   in C ;-) Notably, ksh (not just reimplementations but the real one
> +   from AT&T Research) does not support "local" and cannot be used,
> +   which we might want to reconsider.

The last bit ("which we might want to reconsider") probably belongs in the commit message rather than here in the actual documentation. Saying "we might want to reconsider" doesn't help people new to the project who are looking for guidance _today_.

Show 9 quoted lines
> diff --git c/t/README w/t/README
> @@ -850,6 +850,14 @@ And here are the "don'ts:"
> + - Don't overuse "local"
> +
> +   Because strictly POSIX-compliant shells do not have to support
> +   "local", we avoid using it in our scripted Porcelain scripts, but
> +   we have allowed use of "local" in test scripts.  We may want to
> +   reconsider this and rewrite our tests to also run on shells like
> +   ksh93.  Do not add new use of "local" unnecessarily.

Same comment regarding "We may want to reconsider..."; it probably belongs in the commit message, not here.

Previous: Junio C HamanoNext: rsbecker@nexbridge.com
Message 17 of 18 in “[Test Breakage 2.46.0-rc0] Test t0021.35 fails on NonStop”
  1. rsbecker@nexbridge.comJul 13, 2024
  2. Junio C HamanoJul 14, 2024
  3. rsbecker@nexbridge.comJul 14, 2024
  4. Junio C HamanoJul 14, 2024
  5. rsbecker@nexbridge.comJul 14, 2024
  6. brian m. carlsonJul 14, 2024
  7. rsbecker@nexbridge.comJul 14, 2024
  8. brian m. carlsonJul 14, 2024
  9. rsbecker@nexbridge.comJul 14, 2024
  10. Junio C HamanoJul 15, 2024
  11. rsbecker@nexbridge.comJul 15, 2024
  12. Junio C HamanoJul 15, 2024
  13. rsbecker@nexbridge.comJul 15, 2024
  14. Junio C HamanoJul 15, 2024
  15. rsbecker@nexbridge.comJul 15, 2024
  16. Junio C HamanoJul 15, 2024
  17. Eric SunshineJul 14, 2024
  18. rsbecker@nexbridge.comJul 14, 2024

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.