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

[PATCH] guilt: skip empty line after from: line in patch descriptoin

From
Theodore Ts'o <tytso@mit.edu>
Date
May 22, 2013, 02:43 UTC
Message-ID
<1369190593-6363-1-git-send-email-tytso@mit.edu>

Commit 2cc8d353d7ecb broke manually written patch descriptions of the form:

    > Frobnozzle: this is a patch subject
    >
    > From: Fred McNurk <fred@mcnurt.foo>
    >
    > This is the patch description
Commit 8f88f953580a0 partially fixed things by filtering out the From:
field, but it did not filter out the empty line (if present) after the
From: field, so it resulted in commit bodies which looked like this:
    > Frobnozzle: this is a patch subject
    >
    >
    > This is the patch description
instead of
    > Frobnozzle: this is a patch subject
    >
    > This is the patch description

The ext4 patch queue has used this format for years, and this change should not break other patches which look like mail headers and bodies.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
---
 guilt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/guilt b/guilt
index 4edd1ad..309437a 100755
--- a/guilt
+++ b/guilt
@@ -365,7 +365,7 @@ do_get_header()
 BEGIN{body=0; subj=0}
 /^Subject:/ && (body == 0 && subj == 0){subj=1; print substr($0, 10) "\n"; next}
 /^(Subject:|Author:|Date:|commit)/ && (body == 0){next}
-/^From:/ {next}
+/^From:/ {body=0; next}
 /^(Commit-ID:|Gitweb:|AuthorDate:|Committer:CommitDate:)/ && (body == 0){next}
 /^[ \t\f\n\r\v]*$/ && (body==0){next}
 /^.*$/ && (body==0){body=1}
-- 
1.7.12.rc0.22.gcdd159b
Message 1 of 1 in “guilt: skip empty line after from: line in patch descriptoin”
  1. guilt: skip empty line after from: line in patch descriptoinTheodore Ts'o, May 22, 2013

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.