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

[PATCH] t/chainlint.sed: drop extra spaces from regex character class

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Jul 31, 2018, 05:03 UTC
Message-ID
<20180731050320.29530-1-sunshine@sunshineco.com>

This character class, like many others in this script, matches horizontal whitespace consisting of spaces and tabs, however, a few extra, entirely harmless, spaces somehow slipped into the expression. Removing them is purely a cosmetic fix.

While at it, re-indent three lines with a single TAB each which were incorrectly indented with six spaces. Also, a purely cosmetic fix.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
---

Just something I noticed while examining t/chainlint.sed after reading Jonathan's report[1] of a false-positive.

This is atop 'es/chain-lint-in-subshell' in 'next'.
[1]: https://public-inbox.org/git/20180730181356.GA156463@aiede.svl.corp.google.com/
 t/chainlint.sed | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/t/chainlint.sed b/t/chainlint.sed
index a0de8a3882..5f0882cb38 100644
--- a/t/chainlint.sed
+++ b/t/chainlint.sed
@@ -71,9 +71,9 @@
 # incomplete line -- slurp up next line
 :squash
 /\\$/ {
-      N
-      s/\\\n//
-      bsquash
+	N
+	s/\\\n//
+	bsquash
 }
 
 # here-doc -- swallow it to avoid false hits within its body (but keep the
@@ -199,7 +199,7 @@ s/.*\n//
 # "$(...)" -- command substitution; not closing ")"
 /\$([^)][^)]*)[^)]*$/bcheckchain
 # multi-line "$(...\n...)" -- command substitution; treat as nested subshell
-/\$([ 	     ]*$/bnest
+/\$([ 	]*$/bnest
 # "=(...)" -- Bash array assignment; not closing ")"
 /=(/bcheckchain
 # closing "...) &&"
-- 
2.18.0.597.ga71716f1ad
Message 1 of 1 in “t/chainlint.sed: drop extra spaces from regex character class”
  1. t/chainlint.sed: drop extra spaces from regex character classEric Sunshine, Jul 31, 2018

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.