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

[PATCH] t0060: fix whitespace in "wc -c" invocation

From
Jeff King <peff@peff.net>
Date
Mar 23, 2009, 06:22 UTC
Message-ID
<20090323062229.GA5535@coredump.intra.peff.net>

Some platforms like to stick extra whitespace in the output of "wc -c"; using the result without quotes gets the shell to collapse the whitespace.

Signed-off-by: Jeff King <peff@peff.net>
---
On top of 'next'.
I noticed the breakage on Solaris; I suspect AIX is broken, too.
 t/t0060-path-utils.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/t/t0060-path-utils.sh b/t/t0060-path-utils.sh
index 86000e2..53cf1f8 100755
--- a/t/t0060-path-utils.sh
+++ b/t/t0060-path-utils.sh
@@ -17,7 +17,7 @@ norm_path() {
 # which means that the path / accounts for this many characters:
 rootoff=$(test-path-utils normalize_path_copy / | wc -c)
 # Account for the trailing LF:
-if test "$rootoff" = 2; then
+if test $rootoff = 2; then
 	rootoff=	# we are on Unix
 else
 	rootoff=$(($rootoff-1))
-- 
1.6.2.1.276.gd47fa
Next: Junio C Hamano
Message 1 of 2 in “t0060: fix whitespace in "wc -c" invocation”
  1. t0060: fix whitespace in "wc -c" invocationJeff King, Mar 23, 2009
  2. Junio C HamanoMar 23, 2009

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.