shithub: git9

Download patch

ref: 388cfa1c569fed61e2c5027e1e0cefd95a5ab9a8
parent: c9e501828bd3fdc1309859730530e1968fc28190
author: Michael Forney <[email protected]>
date: Thu Feb 4 00:34:26 EST 2021

git/export: strip non-alphanumeric characters from patch filenames

--- a/export
+++ b/export
@@ -54,7 +54,7 @@
 			printf "Subject: %s %s\n\n", patch, msg
 			
 			gsub("^[ 	]|[ 	]$", "", msg)
-			gsub("[/ 	]", "-", msg)
+			gsub("[^a-zA-Z0-9_]+", "-", msg)
 			printf "%.4d-%s.patch", n, msg >ENVIRON["patchname"]
 			next
 		}