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

[PATCH] remove "[PATCH]" prefix from shortlog output

From
Nicolas Pitre <nico@cam.org>
Date
Dec 10, 2006, 00:58 UTC
Message-ID
<Pine.LNX.4.64.0612091954010.2630@xanadu.home>

This doesn't convey much information in the shortlog context. And the perl version did strip it as well.

Signed-off-by: Nicolas Pitre <nico@cam.org>
---
diff --git a/builtin-shortlog.c b/builtin-shortlog.c
index 7a2ddfe..6c4606b 100644
--- a/builtin-shortlog.c
+++ b/builtin-shortlog.c
@@ -146,6 +146,11 @@ static void insert_author_oneline(struct path_list *list,
 	while (onelinelen > 0 && isspace(oneline[onelinelen - 1]))
 		onelinelen--;
 
+	if (onelinelen > 8 && !strncasecmp(oneline, "[PATCH] ", 8)) {
+		oneline += 8;
+		onelinelen -= 8;
+	}
+
 	buffer = xmalloc(onelinelen + 1);
 	memcpy(buffer, oneline, onelinelen);
Next: Johannes Schindelin
Message 1 of 7 in “remove "[PATCH]" prefix from shortlog output”
  1. remove "[PATCH]" prefix from shortlog outputNicolas Pitre, Dec 10, 2006
  2. Johannes SchindelinDec 10, 2006
  3. Jakub NarebskiDec 10, 2006
  4. Johannes SchindelinDec 10, 2006
  5. Junio C HamanoDec 10, 2006
  6. Johannes SchindelinDec 10, 2006
  7. Nicolas PitreDec 11, 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.