shithub: git9

Download patch

ref: 81329fc7bffdc8441435b958b1cb61e70374ee3f
parent: 849ba78ff89f5e34c753c2d371030ed4a95c08d0
author: kvik <[email protected]>
date: Thu Dec 5 18:31:13 EST 2019

Patch up import header parsing.

--- a/import
+++ b/import
@@ -25,10 +25,10 @@
 		state="headers"
 	}
 	state=="headers" && /^From:/ {
-		sub(/^From:*[ \t]*/, "", $0);
+		sub(/^From:[ \t]*/, "", $0);
 		name=$0;
 		email=$0;
-		sub(/<.*$/, "", name);
+		sub(/[ \t]*<.*$/, "", name);
 		sub(/.*</, "", email);
 		sub(/>/, "", email);
 	}
@@ -37,7 +37,7 @@
 		date=$0
 	}
 	state=="headers" && /^Subject:/{
-		sub(/^Subject: (\[PATCH\])*[ \t]*/, "", $0);
+		sub(/^Subject:[ \t]*(\[PATCH\])*[ \t]*/, "", $0);
 		gotmsg = 1
 		print > "/env/msg"
 	}