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

[PATCH] test-bzr: Do not use unportable sed "\+"

From
Torsten Bögershausen <tboegi@web.de>
Date
May 11, 2013, 13:25 UTC
Message-ID
<201305111525.53130.tboegi@web.de>

Using sed -e '/[0-9]\+//' to find "one ore more" digits is not portable. Use the Basic Regular Expression '/[0-9][0-9]*//' instead

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
---
 contrib/remote-helpers/test-bzr.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/remote-helpers/test-bzr.sh b/contrib/remote-helpers/test-bzr.sh
index d9c32f4..5dfa070 100755
--- a/contrib/remote-helpers/test-bzr.sh
+++ b/contrib/remote-helpers/test-bzr.sh
@@ -328,7 +328,7 @@ test_expect_success 'strip' '
 
   echo four >> content &&
   bzr commit -m four &&
-  bzr log --line | sed -e "s/^[0-9]\+: //" > ../expected
+  bzr log --line | sed -e "s/^[0-9][0-9]*: //" > ../expected
   ) &&
 
   (cd gitrepo &&
-- 
1.8.2.1.614.g66d7af5
Next: Junio C Hamano
Message 1 of 13 in “test-bzr: Do not use unportable sed "\+"”
  1. test-bzr: Do not use unportable sed "\+"Torsten Bögershausen, May 11, 2013
  2. Junio C HamanoMay 11, 2013
  3. Junio C HamanoMay 11, 2013
  4. Torsten BögershausenMay 11, 2013
  5. Junio C HamanoMay 11, 2013
  6. Torsten BögershausenMay 11, 2013
  7. Junio C HamanoMay 12, 2013
  8. t5551: do not use unportable sed '\+'Junio C Hamano, May 12, 2013
  9. Torsten BögershausenMay 13, 2013
  10. Junio C HamanoMay 13, 2013
  11. Torsten BögershausenMay 13, 2013
  12. Junio C HamanoMay 13, 2013
  13. Torsten BögershausenMay 11, 2013

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.