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

[PATCH] shortlog: don't set after_subject to an empty string

From
René Scharfe <l.s.r@web.de>
Date
Mar 17, 2017, 23:52 UTC
Message-ID
<209e03fd-07ae-8e06-3da6-52093495db43@web.de>

The string after_subject is added to a strbuf by pp_title_line() if it's not NULL. Adding an empty string has the same effect as not adding anything, but the latter is easier, so don't bother changing the context member from NULL to "".

Signed-off-by: Rene Scharfe <l.s.r@web.de>
---
 builtin/shortlog.c | 1 -
 1 file changed, 1 deletion(-)
diff --git a/builtin/shortlog.c b/builtin/shortlog.c
index f78bb4818d..7cff1839fc 100644
--- a/builtin/shortlog.c
+++ b/builtin/shortlog.c
@@ -149,7 +149,6 @@ void shortlog_add_commit(struct shortlog *log, struct commit *commit)
 	ctx.fmt = CMIT_FMT_USERFORMAT;
 	ctx.abbrev = log->abbrev;
 	ctx.print_email_subject = 1;
-	ctx.after_subject = "";
 	ctx.date_mode.type = DATE_NORMAL;
 	ctx.output_encoding = get_log_output_encoding();
 
-- 
2.12.0
Message 1 of 1 in “shortlog: don't set after_subject to an empty string”
  1. shortlog: don't set after_subject to an empty stringRené Scharfe, Mar 17, 2017

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.