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

Re: [PATCH] git-submodule.sh: avoid "test <cond> -a/-o <cond>"

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 10, 2014, 14:42 UTC
Message-ID
<xmqqbnu0bzcv.fsf@gitster.dls.corp.google.com>
In-Reply-To
<1402403313-22468-1-git-send-email-gitter.spiros@gmail.com>
Elia Pinto <gitter.spiros@gmail.com> writes:
Show 9 quoted lines
> The construct is error-prone; "test" being built-in in most modern
> shells, the reason to avoid "test <cond> && test <cond>" spawning
> one extra process by using a single "test <cond> -a <cond>" no
> longer exists.
>
> Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
> ---
>
> This is the fourth revision of this patch.
Hmmmm.

When applied on top of 'master', this seems to break 7406; fails the same way with either bash 4.2-2ubuntu2.1 which identifes itself as 4.2.25 or dash 0.5.7-2ubuntu2.

-- >8 --

t7406-submodule-update.sh .. Dubious, test returned 1 (wstat 256, 0x100) Failed 14/43 subtests

Test Summary Report
-------------------
t7406-submodule-update.sh (Wstat: 256 Tests: 43 Failed: 14)
  Failed tests:  4-6, 10-15, 18, 30-33
-- 8< --
Which shell did you test this patch with?
Previous: Elia PintoNext: Torsten Bögershausen
Message 2 of 8 in “git-submodule.sh: avoid "test <cond> -a/-o <cond>"”
  1. git-submodule.sh: avoid "test <cond> -a/-o <cond>"Elia Pinto, Jun 10, 2014
  2. Junio C HamanoJun 10, 2014
  3. Torsten BögershausenJun 10, 2014
  4. Junio C HamanoJun 10, 2014
  5. Junio C HamanoJun 10, 2014
  6. Junio C HamanoJun 10, 2014
  7. Johannes SixtJun 10, 2014
  8. Junio C HamanoJun 10, 2014

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.