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

[PATCH] Fix use of wc in t0000-basic

From
Daniel Barkalow <barkalow@iabervon.org>
Date
May 21, 2005, 00:49 UTC
Message-ID
<Pine.LNX.4.21.0505202045580.30848-100000@iabervon.org>

The version of wc I have (GNU textutils-2.1) puts spaces at the beginning of lines. This patch should work for any version of wc.

Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Acked-by: Junio C Hamano <junkio@cox.net>
Index: t/t0000-basic.sh
===================================================================
--- 58741c69570705801db4b785681790d636475695/t/t0000-basic.sh  (mode:100755 sha1:9a557129d98b499bcd601903d6646de29ba4bfc5)
+++ uncommitted/t/t0000-basic.sh  (mode:100755)
@@ -32,7 +32,7 @@
 find .git/objects -type d -print >full-of-directories
 test_expect_success \
     '.git/objects should have 256 subdirectories.' \
-    'test "$(wc -l full-of-directories | sed -e "s/ .*//")" = 257'
+    'test $(cat full-of-directories | wc -l) = 257'
 
 ################################################################
 # Basics of the basics
Next: Sean
Message 1 of 10 in “Fix use of wc in t0000-basic”
  1. Fix use of wc in t0000-basicDaniel Barkalow, May 21, 2005
  2. SeanMay 21, 2005
  3. Daniel BarkalowMay 21, 2005
  4. SeanMay 21, 2005
  5. Daniel BarkalowMay 21, 2005
  6. Junio C HamanoMay 21, 2005
  7. Herbert XuMay 21, 2005
  8. Junio C HamanoMay 21, 2005
  9. Herbert XuMay 21, 2005
  10. Junio C HamanoMay 21, 2005

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.