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

[PATCH] t5701: "wc -l" may add whitespace

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Aug 29, 2007, 16:52 UTC
Message-ID
<Pine.LNX.4.64.0708291752050.28586@racer.site>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
	Found in msysGit... MSys' wc seems to suffer the same defect that 
	OSX' wc has...
 t/t5701-clone-local.sh |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/t/t5701-clone-local.sh b/t/t5701-clone-local.sh
index d2f55eb..7e7019f 100755
--- a/t/t5701-clone-local.sh
+++ b/t/t5701-clone-local.sh
@@ -54,8 +54,7 @@ test_expect_success 'With -no-hardlinks, local will make a copy' '
 	cd "$D" &&
 	git clone --bare --no-hardlinks x w &&
 	cd w &&
-	linked=$(find objects -type f ! -links 1 | wc -l) &&
-	test "$linked" = 0
+	test $(find objects -type f ! -links 1 | wc -l) = 0
 '
 
 test_expect_success 'Even without -l, local will make a hardlink' '
@@ -63,8 +62,7 @@ test_expect_success 'Even without -l, local will make a hardlink' '
 	rm -fr w &&
 	git clone -l --bare x w &&
 	cd w &&
-	copied=$(find objects -type f -links 1 | wc -l) &&
-	test "$copied" = 0
+	test $(find objects -type f -links 1 | wc -l) = 0
 '
 
 test_done
-- 
1.5.3.rc7.2.g2d7f
Next: Matthieu Moy
Message 1 of 5 in “t5701: "wc -l" may add whitespace”
  1. t5701: "wc -l" may add whitespaceJohannes Schindelin, Aug 29, 2007
  2. Matthieu MoyAug 29, 2007
  3. Johannes SchindelinAug 29, 2007
  4. Junio C HamanoAug 30, 2007
  5. Johannes SchindelinAug 30, 2007

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.