Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jakub Kulik <jakub.kulik@oracle.com>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: several unquoted shell variables causing test failures on Solaris
Date: Thu, 12 Nov 2026 12:56:05 -0800	[thread overview]
Message-ID: <xmqqik21hiqi.fsf@gitster.g> (raw)
In-Reply-To: <SJ0PR10MB5785807828F81EAC8CA165E78A702@SJ0PR10MB5785.namprd10.prod.outlook.com> (Jakub Kulik's message of "Thu, 12 Nov 2026 15:39:01 +0000")

Jakub Kulik <jakub.kulik@oracle.com> writes:

> Hi, when running tests on Solaris, I encountered several test failures in 't1017-cat-file-remote-object-info.sh' which look like this:
>
> ./test-lib.sh: line 1040: cd: /builds/components/git/build/amd64/t/trash directory.t1017-cat-file-remote-object-info/repo/parent/daemon_client_empty: No such file or directory
> not ok 12 - requesting only objectname echoes back
>
> The reason seems to be several unquoted variables (needed because
> of the space in path), and with the following change, the test is
> fixed again:

Strictly speaking, POSIX compliant shells do not require such
quoting for pathnames that are used as redirection target.

But some shells are buggy, and our Documentation/CodingGuidelines do
require them to be quoted.  It also does require there is no space
between redirection operator '>' and the filename, so the correct
formulation would be:

> -     echo_without_newline "$hello_content" > $daemon_parent/hello &&
> +     echo_without_newline "$hello_content" > "$daemon_parent/hello" &&

	echo_without_newline "$hello_content" >"$daemon_parent/hello" &&

Care to submit an official fix with commit log message and sign off?

Thanks.

      reply	other threads:[~2026-11-12 20:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-12 15:39 several unquoted shell variables causing test failures on Solaris Jakub Kulik
2026-11-12 20:56 ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqik21hiqi.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=jakub.kulik@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox