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

Re: [PATCH v2] CodingGuidelines: explicitly allow "local" for test scripts

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
May 4, 2021, 20:22 UTC
Message-ID
<6091ad06cecb0_b34a8208bf@natae.notmuch>
In-Reply-To
<87a6pawmyu.fsf@evledraar.gmail.com>
Ævar Arnfjörð Bjarmason wrote:
Show 12 quoted lines
> On Tue, May 04 2021, Junio C Hamano wrote:
> > Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
> >
> >> It's effectively synonymous with saying "we still want to support git on
> >> platforms that are so broken they can't even run a single test in our
> >> test suite".
> >
> > Not really.  Those on such a platform would (rightly) say that it is
> > the test suite that is broken and out of compliance.
> 
> Indeed. But the lack of any reports about that suggests that in practice
> this is universally supported enough to be a hard dependency.

It is universally supported but not always in the same way, which is why it hasn't managed to become part of POSIX.

I for example stumbled upon an issue where 'local x' does not work the same in bash and zsh, triggering a huge discussion on the zsh mailing list.

However, if you set a value (e.g. 'local x=') then you shouldn't have any problems.

  f () { local x; echo ${x-unset}; }; f # this behavior varies
For a full discussion check [1].
[1] https://www.austingroupbugs.net/bug_view_page.php?bug_id=767
-- 
Felipe Contreras
Previous: Ævar Arnfjörð BjarmasonNext: brian m. carlson
Message 10 of 17 in “CodingGuidelines: explicitly allow "local" for test scripts”
  1. CodingGuidelines: explicitly allow "local" for test scriptsJunio C Hamano, May 3, 2021
  2. Eric SunshineMay 3, 2021
  3. Junio C HamanoMay 3, 2021
  4. CodingGuidelines: explicitly allow "local" for test scriptsJunio C Hamano, May 3, 2021
  5. Ævar Arnfjörð BjarmasonMay 3, 2021
  6. Junio C HamanoMay 4, 2021
  7. Ævar Arnfjörð BjarmasonMay 4, 2021
  8. Junio C HamanoMay 4, 2021
  9. Ævar Arnfjörð BjarmasonMay 4, 2021
  10. Felipe ContrerasMay 4, 2021
  11. brian m. carlsonMay 4, 2021
  12. Junio C HamanoMay 4, 2021
  13. Felipe ContrerasMay 5, 2021
  14. brian m. carlsonMay 5, 2021
  15. Felipe ContrerasMay 5, 2021
  16. Jeff KingMay 5, 2021
  17. Felipe ContrerasMay 5, 2021

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.