git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Todd Zullinger <tmz@pobox.com>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>, Elijah Newren <newren@gmail.com>
Subject: [PATCH] t4038-diff-combined: quote paths with whitespace
Date: Sun, 17 Mar 2019 19:02:39 -0400	[thread overview]
Message-ID: <20190317230239.10131-1-tmz@pobox.com> (raw)

d76ce4f734 ("log,diff-tree: add --combined-all-paths option",
2019-02-07) added tests for files containing tabs.

When the tests are run with bash, the lack of quoting during the file
setup causes 'ambiguous redirect' errors.

Signed-off-by: Todd Zullinger <tmz@pobox.com>
---
Hi,

I noticed these failures while running in a repo where I happened
to have TEST_SHELL_PATH=/bin/bash set.  I wonder if we should
have a test matrix which uses bash to catch these sort of things?

 t/t4038-diff-combined.sh | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/t/t4038-diff-combined.sh b/t/t4038-diff-combined.sh
index 07b49f6d6d..d4afe12554 100755
--- a/t/t4038-diff-combined.sh
+++ b/t/t4038-diff-combined.sh
@@ -480,18 +480,18 @@ test_expect_success FUNNYNAMES 'setup for --combined-all-paths with funny names'
 	git branch side1d &&
 	git branch side2d &&
 	git checkout side1d &&
-	test_seq 1 10 >$(printf "file\twith\ttabs") &&
+	test_seq 1 10 >"$(printf "file\twith\ttabs")" &&
 	git add file* &&
 	git commit -m with &&
 	git checkout side2d &&
-	test_seq 1 9 >$(printf "i\tam\ttabbed") &&
-	echo ten >>$(printf "i\tam\ttabbed") &&
+	test_seq 1 9 >"$(printf "i\tam\ttabbed")" &&
+	echo ten >>"$(printf "i\tam\ttabbed")" &&
 	git add *tabbed &&
 	git commit -m iam &&
 	git checkout -b funny-names-mergery side1d &&
 	git merge --no-commit side2d &&
 	git rm *tabs &&
-	echo eleven >>$(printf "i\tam\ttabbed") &&
+	echo eleven >>"$(printf "i\tam\ttabbed")" &&
 	git mv "$(printf "i\tam\ttabbed")" "$(printf "fickle\tnaming")" &&
 	git add fickle* &&
 	git commit
-- 
Todd

             reply	other threads:[~2019-03-17 23:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-17 23:02 Todd Zullinger [this message]
2019-03-17 23:11 ` [PATCH] t4038-diff-combined: quote paths with whitespace Eric Sunshine
2019-03-18  6:51 ` Junio C Hamano
2019-03-18 15:38 ` Elijah Newren

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=20190317230239.10131-1-tmz@pobox.com \
    --to=tmz@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=newren@gmail.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).