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

[PATCH] cg-log: Remove unpleasant DEL characters.

From
MWMark Wooding <mdw@distorted.org.uk>
Date
Mar 31, 2006, 00:08 UTC
Message-ID
<20060331000813.18895.46855.stgit@metalzone.distorted.org.uk>
From: Mark Wooding <mdw@distorted.org.uk>

There's a Bash bug (I'm running 3.1.5(1)-release from Debian testing) as follows:

  $ foo=@; echo "<${foo:1}>" | cat -v
  <^?>

Without this fix, less gives me ugly standout `^?' markers for every blank line in a commit message.

Signed-off-by: Mark Wooding <mdw@distorted.org.uk>
---
 cg-log |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/cg-log b/cg-log
index 5d5407b..b3374e4 100755
--- a/cg-log
+++ b/cg-log
@@ -181,7 +181,7 @@ process_commit_line()
 {
 	if [ "$key" = "%" ] || [ "$key" = "%$colsignoff" ]; then
 		# The fast common case
-		[ "$state" = silent ] || msg="$msg    ${rest:1}
+		[ "$state" = silent ] || msg="$msg    ${rest#?}
 "
 		return
 	fi
Message 1 of 1 in “cg-log: Remove unpleasant DEL characters.”
  1. cg-log: Remove unpleasant DEL characters.Mark Wooding, Mar 31, 2006

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.