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

Re: t4151 missing quotes

From
Armin Kunaschik <megabreit@googlemail.com>
Date
May 10, 2016, 13:44 UTC
Message-ID
<CALR6jEiFq6kjB0pQgvvd0Pc3i1ZNbGSG2a=i7Hij0HmgUNjgEA@mail.gmail.com>
In-Reply-To
<CAPig+cSRUqSQZ1G73X6szfXjJEwopaO20H_k2vrmmy1qpEftLQ@mail.gmail.com>

Sorry for any duplicate mails, the list blocked my html mail. Note to self: Don't use GMail on a tablet.

On Mon, May 9, 2016 at 11:35 PM, Eric Sunshine <sunshine@sunshineco.com> wrote:
Show 7 quoted lines
>>
>> Hmph, do we have a broken &&-chain?
>
> I don't know. Unfortunately, Armin didn't provide much information in
> his initial email, saying only "skipping through some failed tests",
> which doesn't necessarily indicate if those tests failed or if he
> somehow manually skipped them.

In t4151 there was only a problem with this test. All other tests inside t4151 were ok. Skipping through the tests referred to all git tests, not just t4151.

Show 9 quoted lines
>> If an earlier test fails and leaves an unmerged path, "ls-files -u"
>> would give some output, so "test -z" would get one or more non-empty
>> strings; if we feed multiple, this would fail.  But we would not have
>> even run "test -z" as long as we properly &&-chain these tests.
>>
>> I think the real issue is when the earlier step succeeds and does
>> not leave any unmerged path.  In that case, we would run "test -z"
>> without anything else on the command line, which would lead to an
>> syntax error.

Yes. While debugging the test, I saw a syntax error. I did not try to find out why the test argument is empty. It seems not necessary.. the test logic is still the same.

Show 10 quoted lines
>>     Side Note: /usr/bin/test and test (built into bash and dash)
>>     seem not to care about the lack of string in "test -z <string>"
>>     and "test -n <string>".  It appears to me that they just take
>>     "-z" and "-n" without "<string>" as a special case of "test
>>     <string>" that is fed "-z" or "-n" as <string>.  Apparently, the
>>     platform Armin is working on doesn't.
>
> I also tested on Mac OS X and BSD, and they happily accept bare "test
> -n", as well (though, I don't doubt that there are old shells which
> complain).

I'm building on a quite current AIX 6.1 where /bin/sh defaults to /bin/ksh which is a posix shell (ksh88). Using /bin/bash doesn't work because SHELL_PATH is only used in git scripts but not in any t* test scripts.

Previous: Eric SunshineNext: Jeff King
Message 12 of 13 in “t4151 missing quotes”
  1. Armin KunaschikMay 9, 2016
  2. Eric SunshineMay 9, 2016
  3. Eric SunshineMay 9, 2016
  4. Armin KunaschikMay 9, 2016
  5. Eric SunshineMay 9, 2016
  6. Armin KunaschikMay 9, 2016
  7. Junio C HamanoMay 9, 2016
  8. Stefan BellerMay 9, 2016
  9. Eric SunshineMay 9, 2016
  10. Junio C HamanoMay 9, 2016
  11. Eric SunshineMay 9, 2016
  12. Armin KunaschikMay 10, 2016
  13. Jeff KingMay 10, 2016

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.