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

[PATCH v2 1/6] t4061: use POSIX compliance regex(7)

From
Đoàn Trần Công Danh <congdanhqx@gmail.com>
Date
Mar 22, 2020, 00:55 UTC
Message-ID
<4830bd3aaf6cadc02c00732f8447646064a6ae3e.1584838133.git.congdanhqx@gmail.com>
In-Reply-To
<cover.1584838133.git.congdanhqx@gmail.com>

BRE interprets `+` literally, and `\+` is undefined for POSIX BRE, from: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_03_02

Show 5 quoted lines
> The interpretation of an ordinary character preceded
> by an unescaped <backslash> ( '\\' ) is undefined, except for:
> - The characters ')', '(', '{', and '}'
> - The digits 1 to 9 inclusive
> - A character inside a bracket expression
This test is failing with busybox sed, the default sed of Alpine Linux
Fix it by using literal `+` instead.
Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
---
 t/t4061-diff-indent.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/t/t4061-diff-indent.sh b/t/t4061-diff-indent.sh
index 2affd7a100..0f7a6d97a8 100755
--- a/t/t4061-diff-indent.sh
+++ b/t/t4061-diff-indent.sh
@@ -17,7 +17,7 @@ compare_diff () {
 # Compare blame output using the expectation for a diff as reference.
 # Only look for the lines coming from non-boundary commits.
 compare_blame () {
-	sed -n -e "1,4d" -e "s/^\+//p" <"$1" >.tmp-1
+	sed -n -e "1,4d" -e "s/^+//p" <"$1" >.tmp-1
 	sed -ne "s/^[^^][^)]*) *//p" <"$2" >.tmp-2
 	test_cmp .tmp-1 .tmp-2 && rm -f .tmp-1 .tmp-2
 }
-- 
2.26.0.rc2.310.g2932bb562d
Next: Danh Doan
Message 1 of 6 in “t4061: use POSIX compliance regex(7)”
  1. 1/6 t4061: use POSIX compliance regex(7)Đoàn Trần Công Danh, Mar 22, 2020
  2. Danh DoanMar 22, 2020
  3. 3/6 t5003: skip conversion test if unzip -a is unavailableĐoàn Trần Công Danh, Mar 22, 2020
  4. 4/6 t5616: use rev-parse instead to get HEAD's object_idĐoàn Trần Công Danh, Mar 22, 2020
  5. 6/6 t4124: fix test for non-compliance diffĐoàn Trần Công Danh, Mar 22, 2020
  6. 5/6 t7063: use POSIX find(1) syntaxĐoàn Trần Công Danh, Mar 22, 2020

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.