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

Fix git-mailinfo to understand empty commit messages

From
MCMarco Costalba <mcostalba@yahoo.it>
Date
Aug 19, 2005, 07:59 UTC
Message-ID
<20050819075941.89094.qmail@web26308.mail.ukl.yahoo.com>

In case of empty messages git-mailinfo ignores the "---" line adding dirty stuff in commit message otherwise empty

Signed-off-by: Marco Costalba <mcostalba@yahoo.it>
---
 tools/mailinfo.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
1ebfddf05e4655811157028091d03dfce39cc4f0
diff --git a/tools/mailinfo.c b/tools/mailinfo.c
--- a/tools/mailinfo.c
+++ b/tools/mailinfo.c
@@ -273,6 +273,12 @@ int main(int argc, char ** argv)
 	}
 	while (1) {
 		int len = read_one_header_line(line, sizeof(line), stdin);
+		/* Check for empty messages */
+		if (!memcmp("---", line, 3)) {
+			line[len] = '\n';
+			handle_rest();
+			break;
+		}
 		if (!len) {
 			handle_body();
 			break;




		
____________________________________________________
Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 
Message 1 of 1 in “Fix git-mailinfo to understand empty commit messages”
  1. Marco CostalbaAug 19, 2005

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.