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

Re: [PATCH] hook: test -a|o is not POSIX

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 7, 2022, 21:39 UTC
Message-ID
<xmqqr19j6x92.fsf@gitster.g>
In-Reply-To
<pull.1172.git.git.1641528221530.gitgitgadget@gmail.com>
"Issam Maghni via GitGitGadget" <gitgitgadget@gmail.com> writes:
> From: "Issam E. Maghni" <issam.e.maghni@mailbox.org>
>
> I faced `test: too many arguments` when building using sbase [1]

Building "git" with sbase? It is curious how a loosely written sample hook script can cause build failures on a platform with a more strict userspace.

> This is due to a non-POSIX syntax `test ... -a ...` and `test … -o …`.

That's all correct. The formatting of the above line feels a bit off, though.

Show 7 quoted lines
>> The XSI extensions specifying the -a and -o binary primaries and the
>> '(' and ')' operators have been marked obsolescent.
> [2]
>
> [1] https://core.suckless.org/sbase/
> [2] https://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html
>
Perhaps...
	The sample update script in the templates directory uses the
	`-o` and `-a` binary primaries of the "test" command, which
	are marked obsolescent in the recent versions of POSIX.

...would be sufficient, as 'sbase' would not be the only source of the userspace whose 'test' lack the -o/-a primaries.

Previous: Issam Maghni via GitGitGadgetNext: Issam E. Maghni
Message 2 of 5 in “hook: test -a|o is not POSIX”
  1. hook: test -a|o is not POSIXIssam Maghni via GitGitGadget, Jan 7, 2022
  2. Junio C HamanoJan 7, 2022
  3. Issam E. MaghniJan 7, 2022
  4. Bagas SanjayaJan 9, 2022
  5. Junio C HamanoJan 9, 2022

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.